2007-10-26 22:44:33 +00:00
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
#Redhcp, do the xcat part again
|
2010-02-26 00:02:22 +00:00
|
|
|
FORCENICS=`cat /restart|awk '{print $2}'`
|
2007-10-26 22:44:33 +00:00
|
|
|
rm /restart
|
2008-04-09 20:22:46 +00:00
|
|
|
echo -n > /tmp/dhcpserver
|
2010-02-26 00:02:22 +00:00
|
|
|
if [ ! -z "$FORCENICS" ]; then
|
|
|
|
echo "Forcing down nics aside from $FORCENICS due to discoverynics setting"
|
|
|
|
kill `ps axf|grep udhcpc|egrep -v "$FORCENICS"|grep -v grep|awk '{print $1}'`
|
|
|
|
for nic in `ifconfig|grep HWaddr|awk '{print $1}'|egrep -v "$FORCENICS"`; do
|
|
|
|
ifconfig $nic down
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
WAITING=1
|
|
|
|
while [ $WAITING -gt 0 ]; do
|
|
|
|
killall -12 udhcpc;killall -10 udhcpc
|
|
|
|
echo -n "Wating 10 seconds for DHCP changes to take effect "
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10; do
|
|
|
|
sleep 1
|
|
|
|
echo -n .
|
|
|
|
done
|
|
|
|
WAITING=0
|
|
|
|
if [ ! -z "$FORCENICS" ]; then
|
|
|
|
for nic in `ifconfig|grep HWaddr|awk '{print $1}'|egrep "$FORCENICS"`; do
|
|
|
|
if ! ifconfig $nic|grep "inet addr" > /dev/null; then
|
|
|
|
WAITING=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ $WAITING -gt 0 ]; then
|
2010-05-04 19:35:42 +00:00
|
|
|
echo -n "Not all of the nics $FORCENICS managed to acquire an address, retrying in 30 seconds..."
|
2010-02-26 00:02:22 +00:00
|
|
|
sleep 30
|
|
|
|
echo "now retrying"
|
|
|
|
fi
|
|
|
|
fi
|
2008-04-09 20:22:46 +00:00
|
|
|
done
|
2010-02-26 00:02:22 +00:00
|
|
|
|
2008-04-09 20:22:46 +00:00
|
|
|
echo "Done waiting"
|
2007-10-31 03:42:29 +00:00
|
|
|
/etc/init.d/S11stunnel #redo stunnel config
|
2008-01-29 21:22:34 +00:00
|
|
|
exec /etc/init.d/S99xcat.sh
|