From 5e9d0bbddee99c542452e7bb1ea4296b201e0f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Wed, 30 Mar 2011 16:38:56 +0300 Subject: [PATCH] Give error if puppet binary is not found when running bootstrap-server.sh. --- puppet/bootstrap-server.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/puppet/bootstrap-server.sh b/puppet/bootstrap-server.sh index fccd664..18238b7 100755 --- a/puppet/bootstrap-server.sh +++ b/puppet/bootstrap-server.sh @@ -2,7 +2,13 @@ hostname -f | fgrep "." > /dev/null if [ $? -ne 0 ]; then - echo "error, command 'hostname -f' does not return domainname" + echo "error, command 'hostname -f' does not return domainname" 1>&2 + exit 1 +fi + +which puppet > /dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "error, puppet binary not in path" 1>&2 exit 1 fi