]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Allow dhcp to work with dhcpv3 where the -R option did not exist. Use dhclient.conf...
authorSeewer Philippe <philippe.seewer@bfh.ch>
Mon, 15 Jun 2009 20:57:10 +0000 (16:57 -0400)
committerWarren Togami <wtogami@redhat.com>
Mon, 15 Jun 2009 20:57:10 +0000 (16:57 -0400)
modules.d/40network/dhclient.conf [new file with mode: 0644]
modules.d/40network/ifup
modules.d/40network/install

diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf
new file mode 100644 (file)
index 0000000..9a1509e
--- /dev/null
@@ -0,0 +1,3 @@
+request subnet-mask, broadcast-address, time-offset, routers,
+        domain-name, domain-name-servers, domain-search, host-name,
+        root-path, interface-mtu; 
index 1f0587f004c78eb453f803d64f771c820d61bd0a..5cc39ac2efccadc1f2dcf7acd4bf2d0eee7f3735 100755 (executable)
@@ -58,10 +58,6 @@ do_static() {
 }
 
 do_dhcp() {
-    reqs=subnet-mask,broadcast-address,routers,domain-name
-    reqs=${reqs},domain-name-servers,domain-search
-    reqs=${reqs},host-name,root-path,interface-mtu
-
     for i in ip srv gw mask hostname; do
        eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
     done > /tmp/dhclient.$netif.override
@@ -70,7 +66,7 @@ do_dhcp() {
     # /sbin/dhclient-script will mark the netif up and generate the online
     # event for nfsroot
     # XXX add -V vendor class and option parsing per kernel
-    dhclient -1 -q -R ${reqs} -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif
+    dhclient -1 -q -cf /sbin/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif
 }
 
 ip_to_var() {
index 836c57feb5d81ae54fbc33931d45f6c034e0d2cd..530f9ef548afb0dd6c732aac0e8518830225317d 100755 (executable)
@@ -13,6 +13,7 @@ done
 inst "$moddir/ifup" "/sbin/ifup"
 inst "$moddir/netroot" "/sbin/netroot"
 inst "$moddir/dhclient-script" "/sbin/dhclient-script"
+inst "$moddir/dhclient.conf" "/sbin/dhclient.conf" 
 instmods ecb arc4
 inst_rules "$moddir/60-net.rules"
 inst_hook cmdline 99 "$moddir/dhcp-fallback.sh"