François Périchon
francois.perichon at univ-lille2.fr
Wed Nov 23 02:39:36 CST 2005
Juan Jesús Ojeda Croissier wrote:
> 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.
Yes, but this applet is not built in busybox-cvs-initramfs
> 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:
> <file='scripts/nfs-bottom/hostname'>
> ...
>
> . /tmp/net-${DEVICE}.conf
>
> if [ -n ${HOSTNAME} ]; then
> echo ${HOSTNAME} > /proc/sys/kernel/hostname
> fi
>
> ...
> </file>
I have just tried as you suggest but /proc is unmounted right before
passing to the real init (and remounted by etc/init.d/mountvirtfs?) The
hostname seems to be restored to (none)
--
François Périchon
Service informatique
Université Lille 2
Faculté des Sciences Juridiques, Politiques et Sociales
BP 629
59024 Lille Cédex
tel: +33 3 20 90 77 90
fax: +33 3 20 90 76 15
More information about the ubuntu-devel
mailing list