fixing a naming issue in gce config.sh
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4935d4c1 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4935d4c1 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4935d4c1 Branch: refs/heads/master Commit: 4935d4c1a2cc38dae693145cb944303f8a1fa6ac Parents: 232557a Author: asanka sanjaya <[email protected]> Authored: Wed Jun 3 11:12:06 2015 +0000 Committer: asanka sanjaya <[email protected]> Committed: Wed Jun 3 11:12:06 2015 +0000 ---------------------------------------------------------------------- tools/config-scripts/ec2/config.sh | 2 +- tools/config-scripts/gce/config.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/4935d4c1/tools/config-scripts/ec2/config.sh ---------------------------------------------------------------------- diff --git a/tools/config-scripts/ec2/config.sh b/tools/config-scripts/ec2/config.sh index 4ac4707..880a778 100755 --- a/tools/config-scripts/ec2/config.sh +++ b/tools/config-scripts/ec2/config.sh @@ -33,7 +33,7 @@ CP=`which cp` MV=`which mv` HOSTSFILE=/etc/hosts -LOCKFILE=/mnt/apache-stratos-cartridge-agent-4.0.0/wso2carbon.lck +LOCKFILE=/mnt/apache-stratos-cartridge-agent-4.1.0/wso2carbon.lck DATE=`date +%d%m%y%S` RANDOMNUMBER="`${TR} -c -d 0-9 < /dev/urandom | ${HEAD} -c 4`${DATE}" http://git-wip-us.apache.org/repos/asf/stratos/blob/4935d4c1/tools/config-scripts/gce/config.sh ---------------------------------------------------------------------- diff --git a/tools/config-scripts/gce/config.sh b/tools/config-scripts/gce/config.sh index a2c61b8..80e5739 100644 --- a/tools/config-scripts/gce/config.sh +++ b/tools/config-scripts/gce/config.sh @@ -36,6 +36,7 @@ CURL=`which curl` HOSTSFILE=/etc/hosts DATE=`date +%d%m%y%S` RANDOMNUMBER="`${TR} -c -d 0-9 < /dev/urandom | ${HEAD} -c 4`${DATE}" +LOCKFILE=/mnt/apache-stratos-cartridge-agent-4.1.0/wso2carbon.lck function valid_ip() { @@ -90,7 +91,9 @@ if [[ $answer = y ]] ; then ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}") ${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}" /root/bin/puppetinstall/puppetinstall "${ARGS[@]}" - ${RM} /mnt/apache-stratos-python-cartridge-agent-4.1.0/wso2carbon.lck + if [ -e ${LOCKFILE} ]; then + ${RM} ${LOCKFILE} + fi ${GREP} -q '/root/bin/init.sh > /tmp/puppet_log' /etc/rc.local || ${SED} -i 's/exit 0$/\/root\/bin\/init.sh \> \/tmp\/puppet_log\nexit 0/' /etc/rc.local ${RM} -rf /tmp/* ${RM} -rf /var/lib/puppet/ssl/*
