Commit aa08bdbf authored by Mike Hibler's avatar Mike Hibler

After DHCPing, disable all other interfaces like we do for FBSD and RHL7.

(Hmm...or did Kirk take this out for RHL9 on the wireless nodes??)
parent f1863cfd
#/bin/sh -
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -15,6 +15,9 @@
# interface, we would wind up recursively invoking dhclient (trust me,
# I tried it :-)
#
. /etc/emulab/paths.sh
DEVICE="eth99"
IFACETYPES="3c59x e100 e1000 tulip"
......@@ -26,13 +29,26 @@ modprobe -qa $IFACETYPES
#
# If dhclient returns success, then it has configured the first interface
# and gone into background mode. At that point we don't care about it any
# more and just kill it. We also set ONBOOT=no to prevent ifup (our caller)
# more and just kill it. We also shutdown all the other interfaces (which
# dhclient will leave "up") and set ONBOOT=no to prevent ifup (our caller)
# from doing any further configuration on this fake interface.
#
if [ -x /sbin/dhclient ] && /sbin/dhclient -q ; then
killall dhclient
ONBOOT="no"
killall dhclient
if [ -e $BOOTDIR/controlif ]; then
interface=`cat $BOOTDIR/controlif`
for _if in `ifconfig -s | awk '{ print $1 }' | grep -v Iface`
do
if [ $_if != "lo" -a x$_if != x$interface ]
then
echo "taking $_if down"
ifconfig $_if down
fi >>$LOGDIR/dhclient.log 2>&1
done
fi
ONBOOT="no"
else
# eat flaming death
exit 1
# eat flaming death
exit 1
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment