Browse Source

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.
master
Philippe Seewer 16 years ago committed by Harald Hoyer
parent
commit
d92ca28b16
  1. 2
      modules.d/40network/dhclient-script
  2. 2
      modules.d/40network/ifup
  3. 2
      modules.d/40network/install

2
modules.d/40network/dhclient-script

@ -39,7 +39,7 @@ setup_interface() {
done done
fi >> /tmp/resolv.conf 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 PATH=$PATH:/sbin:/usr/sbin

2
modules.d/40network/ifup

@ -40,7 +40,7 @@ do_static() {
} > /tmp/net.$netif.up } > /tmp/net.$netif.up


[ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw [ -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 echo online > /sys/class/net/$netif/uevent
/sbin/initqueue --onetime --name netroot-$netif /sbin/netroot $netif /sbin/initqueue --onetime --name netroot-$netif /sbin/netroot $netif

2
modules.d/40network/install

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
dracut_install ip dhclient hostname brctl dracut_install ip dhclient brctl
inst "$moddir/ifup" "/sbin/ifup" inst "$moddir/ifup" "/sbin/ifup"
inst "$moddir/netroot" "/sbin/netroot" inst "$moddir/netroot" "/sbin/netroot"
inst "$moddir/dhclient-script" "/sbin/dhclient-script" inst "$moddir/dhclient-script" "/sbin/dhclient-script"

Loading…
Cancel
Save