START=50
CONF=/etc/ucarp.conf
+IP=$(which ip)
+UCARP=$(which ucarp)
+ARPING=$(which arping)
start() {
. ${CONF}
cat > /var/run/ucarp-vip-up <<EOF
#!/bin/sh
-/bin/ip addr add ${VIP}/${VMASK} dev ${IF}
+$IP addr add ${VIP}/${VMASK} dev ${IF}
EOF
for ip in ${PINGIP}
do
cat >> /var/run/ucarp-vip-up <<EOF
-/usr/bin/arping -c 2 -I ${IF} -s ${VIP} ${ip}
+$ARPING -c 2 -I ${IF} -s ${VIP} ${ip}
EOF
done
chmod a+x /var/run/ucarp-vip-up
cat > /var/run/ucarp-vip-down <<EOF
#!/bin/sh
-/bin/ip addr del ${VIP}/${VMASK} dev ${IF}
+$IP addr del ${VIP}/${VMASK} dev ${IF}
EOF
chmod a+x /var/run/ucarp-vip-down
- /usr/sbin/ucarp --interface=${IF} --srcip=${MYIP} --vhid=1 --pass=${PASSWORD} \
+ $UCARP --interface=${IF} --srcip=${MYIP} --vhid=1 --pass=${PASSWORD} \
--addr=${VIP} --nomcast $daemon \
--upscript=/var/run/ucarp-vip-up --downscript=/var/run/ucarp-vip-down
}