This release allowed the network to be configured automatically in one of my setups. Nice.
In addition, the change of making the output on one line might be better, so that the output during boot doesn't get messed up:
--- dhcp.sh.orig Tue Dec 16 00:17:55 2008
+++ dhcp.sh Tue Dec 16 00:26:53 2008
@@ -7,10 +7,8 @@
NETDEVICES="$(awk -F: '/eth.:|tr.:/{print $1}' /proc/net/dev 2>/dev/null)"
for DEVICE in $NETDEVICES; do
- echo -n "${GREEN}Network device ${MAGENTA}$DEVICE${GREEN} detected, DHCP broadcasting for IP.${NORMAL}"
+ echo "${GREEN}Network device ${MAGENTA}$DEVICE${GREEN} detected, DHCP broadcasting for IP. ${BLUE}(Backgrounding)${NORMAL}"
trap 2 3 11
/sbin/udhcpc -b -i $DEVICE -h $(/bin/hostname) -p /var/run/udhcpc.$DEVICE.pid >/dev/null 2>&1 &
trap "" 2 3 11
- sleep 1
- echo " ${BLUE}(Backgrounding)${NORMAL}"
done
Probably could get rid of the trap statements as well since it's backgrounded... but can't hurt to leave them in, I guess.