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
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue