Updated Branches: refs/heads/master e92d46bfd -> 495259132
CLOUDSTACK-4601: Add PATH for cron job of check_heartbeat.sh Also fix a typo in the script template. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/49525913 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/49525913 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/49525913 Branch: refs/heads/master Commit: 495259132cefa8522a824065f6c93c5325482a1a Parents: e92d46b Author: Sheng Yang <[email protected]> Authored: Tue Sep 3 16:51:13 2013 -0700 Committer: Sheng Yang <[email protected]> Committed: Tue Sep 3 16:55:27 2013 -0700 ---------------------------------------------------------------------- patches/systemvm/debian/config/etc/init.d/cloud-early-config | 2 +- .../debian/config/root/redundant_router/check_heartbeat.sh.templ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49525913/patches/systemvm/debian/config/etc/init.d/cloud-early-config ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index 7298bbe..2161333 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -847,7 +847,7 @@ setup_redundant_router() { crontab -l|grep "check_heartbeat.sh" if [ $? -ne 0 ] then - (crontab -l; echo "*/1 * * * * $rrouter_bin_path/check_heartbeat.sh 2>&1 > /dev/null") | crontab + (crontab -l; echo -e "SHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n*/1 * * * * $rrouter_bin_path/check_heartbeat.sh 2>&1 > /dev/null") | crontab fi } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49525913/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ index 7a980bd..1a390e6 100755 --- a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ @@ -22,7 +22,7 @@ then lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2) thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts) diff=$(($thistime - $lasttime)) - if [ $diff -lt 30] + if [ $diff -lt 30 ] then echo Keepalived process is dead! >> [RROUTER_LOG] service keepalived stop >> [RROUTER_LOG] 2>&1
