diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script index f739d8d8..54ec2f56 100755 --- a/modules.d/40network/dhclient-script +++ b/modules.d/40network/dhclient-script @@ -39,7 +39,7 @@ setup_interface() { done fi >> /tmp/resolv.conf - [ -n "$hostname" ] && echo hostname $hostname > /tmp/net.$netif.hostname + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname } PATH=$PATH:/sbin:/usr/sbin diff --git a/modules.d/40network/ifup b/modules.d/40network/ifup index dd45800d..419c2ca6 100755 --- a/modules.d/40network/ifup +++ b/modules.d/40network/ifup @@ -40,7 +40,7 @@ do_static() { } > /tmp/net.$netif.up [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw - [ -n "$hostname" ] && echo hostname $hostname > /tmp/net.$netif.hostname + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname echo online > /sys/class/net/$netif/uevent /sbin/initqueue --onetime --name netroot-$netif /sbin/netroot $netif diff --git a/modules.d/40network/install b/modules.d/40network/install index 91288a9c..c16848d0 100755 --- a/modules.d/40network/install +++ b/modules.d/40network/install @@ -1,5 +1,5 @@ #!/bin/bash -dracut_install ip dhclient hostname brctl +dracut_install ip dhclient brctl inst "$moddir/ifup" "/sbin/ifup" inst "$moddir/netroot" "/sbin/netroot" inst "$moddir/dhclient-script" "/sbin/dhclient-script"