I would be pleased to have any feedback on this patch (and the attached new 
version of /etc/rc.d/network) which is made to run with dhclient instead of 
dhcpcd !

Greetings

-- 
Vincent-Xavier JUMEL
Ingénieur ESIM
+33 (0) 630 803 804
[EMAIL PROTECTED]
http://vincentxavier.free.fr
http://www.archlinux.fr

Attachment: network
Description: application/shellscript

--- /etc/rc.d/network	2007-05-28 15:47:52.000000000 +0200
+++ archlinux.fr/racine/etc/rc.d/network	2007-06-25 01:02:43.000000000 +0200
@@ -41,8 +41,10 @@
 	eval ifcfg="\$${1}"
 	if [ "$ifcfg" = "dhcp" ]; then
 		# remove the .pid file if it exists
-		rm -f /var/run/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1
-		/sbin/dhcpcd $DHCPCD_ARGS ${1}
+		rm -f /var/lib/dhcp/dhclient.${1}.leases >/dev/null 2>&1
+		# I'm not sure if it's safe to remove the lease file
+		rm -rf /var/run/dhclient.${1}.pid >/dev/null 2>&1
+		/sbin/dhclient -lf /var/lib/dhcp/dhclient.${1}.leases -pf /var/run/dhclient.${1}.pid ${1}
 	else
 		/sbin/ifconfig $ifcfg
 	fi
@@ -57,8 +59,8 @@
 	fi
 	eval ifcfg="\$${1}"
 	if [ "$ifcfg" = "dhcp" ]; then
-		if [ -f /var/run/dhcpcd-${1}.pid ]; then
-			kill `cat /var/run/dhcpcd-${1}.pid`
+		if [ -f /var/run/dhclient.${1}.pid ]; then
+			kill `cat /var/run/dhclient.${1}.pid`
 		else
 			# No .pid file, just bring the interface itself down
 			/sbin/ifconfig ${1} down

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch

Reply via email to