|
|
261ad6 |
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
|
|
261ad6 |
index 2791ea0..74bdef1 100755
|
|
|
261ad6 |
--- a/heartbeat/IPaddr2
|
|
|
261ad6 |
+++ b/heartbeat/IPaddr2
|
|
|
261ad6 |
@@ -446,7 +446,7 @@ ip_init() {
|
|
|
261ad6 |
ocf_log warn "[$FINDIF] failed"
|
|
|
261ad6 |
exit $OCF_SUCCESS
|
|
|
261ad6 |
else
|
|
|
261ad6 |
- ocf_exit_reason "[$FINDIF] failed"
|
|
|
261ad6 |
+ ocf_log err "[$FINDIF] failed"
|
|
|
261ad6 |
exit $rc
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
diff --git a/heartbeat/findif.sh b/heartbeat/findif.sh
|
|
|
261ad6 |
index 98649bf..6250a03 100644
|
|
|
261ad6 |
--- a/heartbeat/findif.sh
|
|
|
261ad6 |
+++ b/heartbeat/findif.sh
|
|
|
261ad6 |
@@ -75,26 +75,26 @@ findif_check_params()
|
|
|
261ad6 |
if [ "$family" = "inet6" ] ; then
|
|
|
261ad6 |
ipcheck_ipv6 $match
|
|
|
261ad6 |
if [ $? = 1 ] ; then
|
|
|
261ad6 |
- ocf_log err "IP address [$match] not valid."
|
|
|
261ad6 |
+ ocf_exit_reason "IP address [$match] not valid."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
if [ -n "$nic" ] ; then
|
|
|
261ad6 |
ifcheck_ipv6 $nic
|
|
|
261ad6 |
if [ $? = 1 ] ; then
|
|
|
261ad6 |
- ocf_log err "Unknown interface [$nic] No such device."
|
|
|
261ad6 |
+ ocf_exit_reason "Unknown interface [$nic] No such device."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
else
|
|
|
261ad6 |
echo $match | grep -qis '^fe80::'
|
|
|
261ad6 |
if [ $? = 0 ] ; then
|
|
|
261ad6 |
- ocf_log err "'nic' parameter is mandatory for a link local address [$match]."
|
|
|
261ad6 |
+ ocf_exit_reason "'nic' parameter is mandatory for a link local address [$match]."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
if [ -n "$netmask" ] ; then
|
|
|
261ad6 |
prefixcheck $netmask 128
|
|
|
261ad6 |
if [ $? = 1 ] ; then
|
|
|
261ad6 |
- ocf_log err "Invalid netmask specification [$netmask]."
|
|
|
261ad6 |
+ ocf_exit_reason "Invalid netmask specification [$netmask]."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
@@ -102,27 +102,27 @@ findif_check_params()
|
|
|
261ad6 |
# family = inet
|
|
|
261ad6 |
ipcheck_ipv4 $match
|
|
|
261ad6 |
if [ $? = 1 ] ; then
|
|
|
261ad6 |
- ocf_log err "IP address [$match] not valid."
|
|
|
261ad6 |
+ ocf_exit_reason "IP address [$match] not valid."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
if [ -n "$nic" ] ; then
|
|
|
261ad6 |
ifcheck_ipv4 $nic
|
|
|
261ad6 |
if [ $? = 1 ] ; then
|
|
|
261ad6 |
- ocf_log err "Unknown interface [$nic] No such device."
|
|
|
261ad6 |
+ ocf_exit_reason "Unknown interface [$nic] No such device."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
if [ -n "$netmask" ] ; then
|
|
|
261ad6 |
prefixcheck $netmask 32
|
|
|
261ad6 |
if [ $? = 1 ] ; then
|
|
|
261ad6 |
- ocf_log err "Invalid netmask specification [$netmask]."
|
|
|
261ad6 |
+ ocf_exit_reason "Invalid netmask specification [$netmask]."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
if [ -n "$brdcast" ] ; then
|
|
|
261ad6 |
ipcheck_ipv4 $brdcast
|
|
|
261ad6 |
if [ $? = 1 ] ; then
|
|
|
261ad6 |
- ocf_log err "Invalid broadcast address [$brdcast]."
|
|
|
261ad6 |
+ ocf_exit_reason "Invalid broadcast address [$brdcast]."
|
|
|
261ad6 |
return $OCF_ERR_CONFIGURED
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
@@ -166,13 +166,13 @@ findif()
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
if [ -z "$nic" -o -z "$netmask" ] ; then
|
|
|
261ad6 |
if [ $# = 0 ] ; then
|
|
|
261ad6 |
- ocf_log err "Unable to find nic or netmask."
|
|
|
261ad6 |
+ ocf_exit_reason "Unable to find nic or netmask."
|
|
|
261ad6 |
return $OCF_ERR_GENERIC
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
case $1 in
|
|
|
261ad6 |
*/*) : OK ;;
|
|
|
261ad6 |
*)
|
|
|
261ad6 |
- ocf_log err "Unable to find cidr_netmask."
|
|
|
261ad6 |
+ ocf_exit_reason "Unable to find cidr_netmask."
|
|
|
261ad6 |
return $OCF_ERR_GENERIC ;;
|
|
|
261ad6 |
esac
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
@@ -187,7 +187,7 @@ findif()
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
else
|
|
|
261ad6 |
if [ -z "$OCF_RESKEY_nic" -a "$netmask" != "${1#*/}" ] ; then
|
|
|
261ad6 |
- ocf_log err "Unable to find nic, or netmask mismatch."
|
|
|
261ad6 |
+ ocf_exit_reason "Unable to find nic, or netmask mismatch."
|
|
|
261ad6 |
return $OCF_ERR_GENERIC
|
|
|
261ad6 |
fi
|
|
|
261ad6 |
fi
|