<x-flowed>is there a reason why the piece of code that checks for the dhcp's ip can't
be at the end of the function after setting the ip on the interface?
start-auto-if-dhcp () {
[ "$IFDHCP" = "" ] && return
vb echo -n "$SP""DHCP: "
qt killall dhclient
for f in $IFDHCP; do
qt dhclient $f
done
for f in $IFDHCP; do
st=0
while :; do
ip="$(ifconfig-ip $f)"
qt ping -c 1 $ip
if [ $? -eq 0 ]; then
vb echo -n "$f=$ip "
break
fi
sleep 3
st=$(($st + 3))
if [ $st -ge $DHCP_SLEEP ]; then
vb echo -n "$f=TIMEOUT "
break
fi
done
done
x=0
while [ $x -lt $MAX_LOOP ]; do # Set ip, bcast, and mask from
interface
eval IFNAME=\${"IF$x"_IFNAME:-""}
if [ "$IFNAME" != "" ]; then
eval IPADDR=\${"IF$x"_IPADDR:-""}
if [ "$IPADDR" = "dhcp" ]; then
set -- $(ifconfig-ip_bcast_mask $IFNAME)
eval "IF$x"_IPADDR=\$1
eval "IF$x"_BROADCAST=\$2
eval "IF$x"_NETMASK=\$3
fi
fi
x=$(($x + 1))
done
vb echo
}
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/leaf-devel
</x-flowed>
- [Leaf-devel] bug_id=119749 Mike Noyes
- Re: [Leaf-devel] bug_id=119749 Charles Steinkuehler
- Re: [Leaf-devel] bug_id=119749 Mike Noyes
- Re: [Leaf-devel] bug_id=119749 Pedro Barreto
- Re: [Leaf-devel] bug_id=119749 David Douthitt
- Re: [Leaf-devel] bug_id=119749 Mike Noyes
- Re: [Leaf-devel] bug_id=119749 Mike Noyes
- Re: [Leaf-devel] bug_id=119749 Mike Noyes
- Re: [Leaf-devel] bug_id=119749 Rick Onanian
- Re: [Leaf-devel] bug_id=119749 Mike Noyes
- Re: [Leaf-devel] bug_id=119749 Pedro Barreto
- Re: [Leaf-devel] bug_id=119749 Mike Noyes
- Re: [Leaf-devel] bug_id=119749 Pedro Barreto
- Re: [Leaf-devel] bug_id=119749 Ray Olszewski
