From c47bc3664e4ba5cedd5403350c76d158c29adf3d Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Wed, 14 Sep 2011 12:15:24 -0700 Subject: [PATCH] Add rrouter lock for edithost.sh and ipassoc.sh --- patches/systemvm/debian/config/root/edithosts.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/systemvm/debian/config/root/edithosts.sh b/patches/systemvm/debian/config/root/edithosts.sh index 6b566de4b6c..bb88c6a3f7f 100755 --- a/patches/systemvm/debian/config/root/edithosts.sh +++ b/patches/systemvm/debian/config/root/edithosts.sh @@ -33,6 +33,13 @@ then exit 1 fi +lock_rr="rrouter" +locked_rr=$(getLockFile $lock_rr) +if [ "$locked_rr" != "1" ] +then + exit 1 +fi + grep "redundant_router=1" /var/cache/cloud/cmdline > /dev/null no_redundant=$? @@ -89,4 +96,6 @@ else fi fi -unlock_exit $? $lock $locked +ret=$? +releaseLockFile $lock_rr $locked_rr +unlock_exit $ret $lock $locked