From 53e843bed178a1f497ca797af87fc61d5432863d Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 22 Nov 2012 08:49:27 +0000 Subject: [PATCH] add return value git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14401 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/confighfi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT/postscripts/confighfi b/xCAT/postscripts/confighfi index e5f1f0c79..69856a993 100644 --- a/xCAT/postscripts/confighfi +++ b/xCAT/postscripts/confighfi @@ -14,6 +14,8 @@ PLTFRM=`uname` NETMASK=255.0.0.0 +RETURNVAL=0 + # bond-mld binary is shipped seperately, admin should adjust the following PATH # to where bond-mld binary is. PATH=$PATH:/usr/local/sbin/ @@ -49,10 +51,12 @@ ONBOOT=yes ifup hf0 else logger -t xcat -p local4.err "confighfi: cannot resolve hostname $name-hf0" + RETURNVAL=-1 fi elif [[ -z "$NTYPE" ]] then logger -t xcat -p local4.err "confighfi: cannot read node type definition" + RETURNVAL=-1 fi # Configure hf0-hf interfaces one by one. @@ -74,6 +78,7 @@ ONBOOT=yes ifup hf$i else logger -t xcat -p local4.err "confighfi: cannot resolve hostname $name-hf$i" + RETURNVAL=-1 fi done @@ -121,10 +126,12 @@ else mkhfi -i hf0 -a $CLIENT_IP -m $NETMASK else logger -t xcat -p local4.err "confighfi: cannot resolve hostname $name-hf0" + RETURNVAL=-1 fi elif [[ -z "$NTYPE" ]] then logger -t xcat -p local4.err "confighfi: cannot read node type definition" + RETURNVAL=-1 fi for i in 1 2 3 @@ -136,6 +143,7 @@ else mkhfi -i hf$i -a $CLIENT_IP -m $NETMASK else logger -t xcat -p local4.err "confighfi: cannot resolve hostname $name-hf$i" + RETURNVAL=-1 fi done @@ -158,6 +166,9 @@ else chdev -l ml0 -a netaddr=$CLIENT_IP -a netmask=$NETMASK -a state=up else logger -t xcat -p local4.err "confighfi: cannot resolve hostname $name-ml0" + RETURNVAL=-1 fi fi + +exit $RETURNVAL