diff --git a/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ b/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ index 051ee0386c9..2bfb7cd2fe2 100755 --- a/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ +++ b/systemvm/patches/debian/config/opt/cloud/templates/check_heartbeat.sh.templ @@ -35,7 +35,12 @@ then s=$(($s+1)) echo $s > $STRIKE_FILE else - rm $STRIKE_FILE + if [ -e $STRIKE_FILE ] + then + rm $STRIKE_FILE + else + echo keepalived.strikes file does not exist! >> $ROUTER_LOG + fi fi #3 strikes rule if [ $s -gt 2 ] diff --git a/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ b/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ index d7d211ee57f..4253b291296 100755 --- a/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ +++ b/systemvm/patches/debian/config/root/redundant_router/check_heartbeat.sh.templ @@ -16,8 +16,8 @@ # specific language governing permissions and limitations # under the License. - -STRIKE_FILE="[RROUTER_BIN_PATH]/keepalived.strikes" +ROUTER_BIN_PATH=/ramdisk/rrouter +STRIKE_FILE="$ROUTER_BIN_PATH/keepalived.strikes" if [ -e [RROUTER_BIN_PATH]/keepalived.ts2 ] then @@ -34,7 +34,12 @@ then s=$(($s+1)) echo $s > $STRIKE_FILE else - rm $STRIKE_FILE + if [ -e $STRIKE_FILE ] + then + rm $STRIKE_FILE + else + echo keepalived.strikes file does not exist! >> $ROUTER_LOG + fi fi #3 strikes rule if [ $s -gt 2 ]