Hi, I was going through the init.sh script which is run when an instance is spawned from a cartridge. Following variables seem to be unused after declaration.
Line 38: PUPPETD=`which puppet` is declared and used subsequently in PUPPETAGENT and COMMAND. However when actually running the puppet agent at line 126 PUPPET is declared again and used to construct the puppet agent command. The method read_master() is also not used in the script. Can these be removed for clarity? diff --git a/tools/puppet3-agent/init.sh b/tools/puppet3-agent/init.sh index 172bf54..d2caaf6 100755 --- a/tools/puppet3-agent/init.sh +++ b/tools/puppet3-agent/init.sh @@ -35,11 +35,7 @@ SLEEP=`which sleep` TR=`which tr` HEAD=`which head` WGET=`which wget` -PUPPETD=`which puppet` -AGENT="agent" -PUPPETAGENT="${PUPPETD} ${AGENT}" -COMMAND="${PUPPETAGENT} -vt" IP=`${IFCONFIG} eth0 | ${GREP} -e "inet addr" | ${AWK} '{print $2}' | ${CUT} -d ':' -f 2` LOG=/tmp/puppet-init.log @@ -47,11 +43,6 @@ HOSTSFILE=/etc/hosts HOSTNAMEFILE=/etc/hostname PUPPETCONF=/etc/puppet/puppet.conf -read_master() { - ${COMMAND} -} - - is_public_ip_assigned() { while true Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com