Juan Jesús Ojeda Croissier juanje at interactors.coop
Tue Nov 22 20:16:50 CST 2005

El mar, 22-11-2005 a las 16:24 -0800, Matt Zimmerman escribió:
> Does klibc or busybox have a hostname command?  It would be simpler to set
> it in early userspace and be done with it.

Actually, busybox does.
Anyway, since the procfs is the same before and after the initramfs, and
the real 'hostname' is stored in '/proc/sys/kernel/hostname', we could
just set the hostname there by echoing.
For example:

. /tmp/net-${DEVICE}.conf

if [ -n ${HOSTNAME} ]; then
   echo ${HOSTNAME} > /proc/sys/kernel/hostname


   \|/  interactors              | juanje arroba interactors.coop
  \|/    |_ activando redes      | http://interactors.coop
 \|/     |_ activating networks  | http://metadistros.software-libre.org

More information about the ubuntu-devel mailing list