puppet: Fixed bootstrap-server.sh for OpenBSD.

This commit is contained in:
Timo Mkinen 2013-09-09 14:12:54 +03:00
parent e14fc2e327
commit caa6ab3e22

View file

@ -11,10 +11,16 @@ case $1 in
;;
esac
hostname -f | fgrep "." > /dev/null
if [ $? -ne 0 ]; then
echo "error, command 'hostname -f' does not return domainname" 1>&2
exit 1
hostname | fgrep "." > /dev/null
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
exit 1
fi
FQDN="$(hostname -f)"
fi
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
fi
FQDN="$(hostname -f)"
mkdir -p /srv
mkdir -p /etc/puppet/manifests/node
if [ ! -s /etc/puppet/manifests/site.pp ]; then