*** /usr/lib/ocf/resource.d/heartbeat/IPaddr2.orig Tue Mar 6 16:13:02 2007 --- /usr/lib/ocf/resource.d/heartbeat/IPaddr2 Thu Mar 8 12:58:00 2007 *************** *** 246,251 **** --- 246,255 ---- } ip_init() { + if [ X`uname -s` != "XLinux" ]; then + ocf_log err "IPaddr2 only supported Linux." + exit $OCF_ERR_INSTALLED + fi if case $__OCF_ACTION in start|stop) ocf_is_root;; *************** *** 276,287 **** IF_MAC="$OCF_RESKEY_mac" LVS_SUPPORT=0 ! if [ "$SYSTYPE" = "Linux" -o "$SYSTYPE" = "SunOS" ]; then ! if [ x"${OCF_RESKEY_lvs_support}" = x"true" \ -o x"${OCF_RESKEY_lvs_support}" = x"on" \ -o x"${OCF_RESKEY_lvs_support}" = x"1" ]; then LVS_SUPPORT=1 - fi fi IP_INC_GLOBAL=${OCF_RESKEY_incarnations_max_global:-1} --- 280,289 ---- IF_MAC="$OCF_RESKEY_mac" LVS_SUPPORT=0 ! if [ x"${OCF_RESKEY_lvs_support}" = x"true" \ -o x"${OCF_RESKEY_lvs_support}" = x"on" \ -o x"${OCF_RESKEY_lvs_support}" = x"1" ]; then LVS_SUPPORT=1 fi IP_INC_GLOBAL=${OCF_RESKEY_incarnations_max_global:-1} *************** *** 527,547 **** # no = nothing # ip_served() { ! case `find_interface $BASEIP` in ! lo*) if [ "$LVS_SUPPORT" = "1" ]; then ! echo "no" ! return 0 ! fi ! ;; ! "") echo "no" return 0 ! ;; ! *) if [ -z "$IP_CIP" ]; then ! echo "ok" ! return 0 ! fi ! ;; ! esac # Special handling for the CIP: --- 529,553 ---- # no = nothing # ip_served() { ! cur_nic="`find_interface $BASEIP`" ! ! if [ -z "$cur_nic" ]; then ! echo "no" return 0 ! fi ! ! if [ -z "$IP_CIP" ]; then ! case $cur_nic in ! lo*) if [ "$LVS_SUPPORT" = "1" ]; then ! echo "no" ! return 0 ! fi ! ;; ! esac ! ! echo "ok" ! return 0 ! fi # Special handling for the CIP: