Buildroot: setting hostname in /etc/inittab

Joseph M Dupre (AVAB Inc.) dupre at avab.com
Mon Nov 28 22:24:01 UTC 2005


In Buildroot, If coreutils is installed hostname is not correctly 
set. This appears to be caused by coreutils installing it's own 
version of hostname (overwriting the link to use the busybox version 
of hostname).

Then this line in /etc/inittab fails because coreutils version of 
hostname does not support the -F option:

     null::sysinit:/bin/hostname -F /etc/hostname

This can be fixed by changing inittab to read:

     null::sysinit:/bin/busybox hostname -F /etc/hostname

But what if busybox is not installed?  Would it be "better" to move 
the setting of hostname to an init.d script?

- Joe-- 
Joseph M. Dupré
Design Engineer
SAND Network Systems
+1 707 778 8990 x207




More information about the uClibc mailing list