]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
40network: Copy the customize dhcp config
authorMinfei Huang <mhuang@redhat.com>
Mon, 27 Oct 2014 06:33:11 +0000 (14:33 +0800)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 Oct 2014 13:13:50 +0000 (14:13 +0100)
It is not available to valid the customize dhcp config
/etc/dhclient.conf in the initram environment.

Dracut uses the default follow config to construct the initramfs.

request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        root-path, interface-mtu;

Copy the customize config to make the config availably in the
initram environment.

Signed-off-by: Minfei Huang <mhuang@redhat.com>
modules.d/40network/module-setup.sh

index ae1f43fa0f44ee7cc7251e581a7d559c1185a6b6..55bee4cb1704ab527932b63bddf324882ad1e54a 100755 (executable)
@@ -79,7 +79,8 @@ install() {
     inst_script "$moddir/netroot.sh" "/sbin/netroot"
     inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
     inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"
-    inst_simple "$moddir/dhclient.conf" "/etc/dhclient.conf"
+    inst_simple -H "/etc/dhclient.conf"
+    cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
     inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
     inst_hook pre-udev 60 "$moddir/net-genrules.sh"
     inst_hook cmdline 91 "$moddir/dhcp-root.sh"