Sheng Yang abc44ac283 bug 11266: Add lock file for every script in the systemVM
To prevent them from racy.

status 11266: resolved fixed
2011-09-09 18:27:33 -07:00

18 lines
386 B
Bash

#!/bin/bash
source /root/func.sh
lock="rrouter"
locked=$(getLockFile $lock)
if [ "$locked" != "1" ]
then
exit 1
fi
echo To fault called >> /root/keepalived.log
/root/redundant_router/disable_pubip.sh >> /root/keepalived.log 2>&1
/root/redundant_router/primary-backup.sh fault >> /root/keepalived.log 2>&1
echo Status: FAULT >> /root/keepalived.log
releaseLockFile $lock $locked