--- heartbeat/IPaddr2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/heartbeat/IPaddr2 +++ b/heartbeat/IPaddr2 @@ -13,6 +13,7 @@ # Copyright (c) 2003 Tuomo Soini # Copyright (c) 2004-2006 SUSE LINUX AG, Lars Marowsky-Brée # All Rights Reserved. +# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as @@ -50,6 +51,7 @@ # OCF_RESKEY_nic # OCF_RESKEY_cidr_netmask # OCF_RESKEY_iflabel +# OCF_RESKEY_if_type # OCF_RESKEY_mac # OCF_RESKEY_clusterip_hash # OCF_RESKEY_arp_interval @@ -314,7 +316,13 @@ ip_init() { BASEIP="$OCF_RESKEY_ip" BRDCAST="$OCF_RESKEY_broadcast" - NIC="$OCF_RESKEY_nic" + IFTYPE="$OCF_RESKEY_if_type" + if [ -n "${IFTYPE}" ] + then + NIC=`grep ${IFTYPE}= /etc/platform/platform.conf | cut -f2 -d '='` + else + NIC="$OCF_RESKEY_nic" + fi # Note: We had a version out there for a while which used # netmask instead of cidr_netmask. Don't remove this aliasing code! if