Give error if puppetmaster does not have domainname when running bootstrap-server.sh.

This commit is contained in:
Timo Mkinen 2011-03-30 16:32:41 +03:00
parent 9691ca3977
commit e491a66ef4

View file

@ -1,5 +1,11 @@
#!/bin/sh #!/bin/sh
hostname -f | fgrep "." > /dev/null
if [ $? -ne 0 ]; then
echo "error, command 'hostname -f' does not return domainname"
exit 1
fi
mkdir -p /etc/puppet/manifests mkdir -p /etc/puppet/manifests
if [ ! -s /etc/puppet/manifests/site.pp ]; then if [ ! -s /etc/puppet/manifests/site.pp ]; then
echo "" > /etc/puppet/manifests/site.pp echo "" > /etc/puppet/manifests/site.pp