slitaz-boot-scripts rev 86 2.3

hwconf.sh: retry DHCP connection only if any pid file found
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 16 01:08:50 2008 +0200 (2008-05-16)
parents 1127ecb2b484
children 16d0f81a74da
files etc/init.d/hwconf.sh
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Thu May 15 20:26:04 2008 +0000
     1.2 +++ b/etc/init.d/hwconf.sh	Fri May 16 01:08:50 2008 +0200
     1.3 @@ -38,9 +38,10 @@
     1.4  		/etc/rcS.conf
     1.5  	# Retry a network connection with DHCP.
     1.6  	if ifconfig -a | grep -q "eth0"; then
     1.7 -		killall udhcpc
     1.8 -		echo "Starting udhcpc client on: eth0... "
     1.9 -		/sbin/udhcpc -b -i eth0 -p /var/run/udhcpc.eth0.pid
    1.10 +		if [ ! -f /var/run/udhcpc.eth0.pid ]; then
    1.11 +			echo "Starting udhcpc client on: eth0... "
    1.12 +			/sbin/udhcpc -b -i eth0 -p /var/run/udhcpc.eth0.pid
    1.13 +		fi
    1.14  	fi
    1.15  fi
    1.16