puppet: Fixed bootstrap-server.sh for OpenBSD.
This commit is contained in:
parent
e14fc2e327
commit
caa6ab3e22
1 changed files with 11 additions and 6 deletions
|
@ -11,10 +11,16 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
hostname -f | fgrep "." > /dev/null
|
hostname | fgrep "." > /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
FQDN="$(hostname)"
|
||||||
|
else
|
||||||
|
hostname -f | fgrep "." > /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
echo "error, command 'hostname -f' does not return domainname" 1>&2
|
echo "error, command 'hostname -f' does not return domainname" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
FQDN="$(hostname -f)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which ruby > /dev/null 2>&1
|
which ruby > /dev/null 2>&1
|
||||||
|
@ -33,8 +39,7 @@ if [ -s /etc/puppet/puppet.conf ]; then
|
||||||
mv /etc/puppet/puppet.conf /etc/puppet/puppet.conf.orig
|
mv /etc/puppet/puppet.conf /etc/puppet/puppet.conf.orig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FQDN="$(hostname -f)"
|
mkdir -p /srv
|
||||||
|
|
||||||
mkdir -p /etc/puppet/manifests/node
|
mkdir -p /etc/puppet/manifests/node
|
||||||
|
|
||||||
if [ ! -s /etc/puppet/manifests/site.pp ]; then
|
if [ ! -s /etc/puppet/manifests/site.pp ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue