From: Philippe Seewer Date: Thu, 17 Sep 2009 15:16:44 +0000 (+0200) Subject: Get rid of hostname utility X-Git-Tag: 003~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d92ca28b168e969360bb82467c09caf15d4789c1;p=thirdparty%2Fdracut.git Get rid of hostname utility dracut doesn't really need a utility to set the hostname. It only saves a few ks of space, but every bit is good. --- diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script index f739d8d8a..54ec2f568 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 dd45800d7..419c2ca61 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 91288a9cd..c16848d09 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"