Sorry I might have attached teh wrong file. So here comes the patch !
My reason for switching to dhclient instead of dhcpd are very simple. There is 
stricly no configuration file for dhpcd. Thus if you wat to use 
NetworkManager (a useful application for laptop user who wnats to promote 
Linux), you do not have any control over /etc/resolv.conf and stuff like 
that. Moreover, dhclient got some verbose mode and is outputing information 
on /dev/log, which can be useful to debug a tricky dhcp server !
-- 
Vincent-Xavier JUMEL
Ingénieur ESIM
+33 (0) 630 803 804
[EMAIL PROTECTED]
http://vincentxavier.free.fr
http://www.archlinux.fr
--- /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: network
Description: application/shellscript

_______________________________________________
arch mailing list
arch@archlinux.org
http://archlinux.org/mailman/listinfo/arch

Reply via email to