[BusyBox 0001244]: (init) inittab handling broken in revision 17937

bugs at busybox.net bugs at busybox.net
Sun Nov 25 06:21:19 UTC 2007


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1244 
====================================================================== 
Reported By:                espakman
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1244
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
====================================================================== 
Date Submitted:             03-01-2007 13:14 PST
Last Modified:              11-24-2007 22:21 PST
====================================================================== 
Summary:                    (init) inittab handling broken in revision 17937
Description: 
Since revision 17937 not all items in the inittab are executed.

My inittab file:

::sysinit:/etc/init.d/rcS
::wait:/etc/init.d/rc 2

tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2

::restart:/sbin/init

::shutdown:/etc/init.d/rc 0


The "wait" (rc 2) and "shutdown" (rc 0) scripts are not executed after rev
17937, also if I replace the "wait" with a second "sysinit" this line is
not executed. Running rc 0 or rc 2 by hand or using a busybox before rev
17937 works fine.

Libc: uClibc-0.9.28
gcc: gcc-3.3.3

====================================================================== 

---------------------------------------------------------------------- 
 espakman - 03-02-07 12:38  
---------------------------------------------------------------------- 
The problem seems to be a bit different. No init startup/shutdown output is
shown on the console anymore and some daemons won't start up on boot time
with this revision (maybe they need a controlling tty?). Some examples of
daemons that won't start on init: dnsmasq and ulogd 

---------------------------------------------------------------------- 
 hwstar - 11-24-07 18:45  
---------------------------------------------------------------------- 
I'm seeing a similar issue with Busybox 1.7.2

Inittab does not reliably execute the following lines:

# Startup the system
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -n -o remount,rw /
null::sysinit:/bin/mount -a
null::sysinit:/sbin/ifconfig lo 127.0.0.1 up
null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
#run the pre init script
::sysinit:/bin/echo "running rc.pre-init"
::sysinit:/etc/init.d/rc.pre-init
::sysinit:/bin/echo "rc.pre-init done"
null::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/bin/echo "running rcS"
::sysinit:/etc/init.d/rcS

Sometimes rc_pre-init runs, sometimes it doesn't.
Sometimes rcS runs, sometimes it doesn't.

Results vary between boot ups. 

---------------------------------------------------------------------- 
 vda - 11-24-07 20:57  
---------------------------------------------------------------------- 
Programs which need controlling tty can be started like this:

::sysinit:/bin/cttyhack <program> <params>

> Sometimes rc_pre-init runs, sometimes it doesn't.
> Sometimes rcS runs, sometimes it doesn't.

What does it print? Does it help when you add /bin/cttyhack as shown
above?

Try disabling FEATURE_INIT_SYSLOG and watching init messages on VT 5.
(Strange method of sending messages, if you ask me). 

---------------------------------------------------------------------- 
 hwstar - 11-24-07 22:21  
---------------------------------------------------------------------- 
Ok, I recompiled busybox with cttyhack enabled and FEATURE_INIT_SYSLOG
disabled.

I know of no way to capture the output as I'm using a CRT  as the output
device.

VT(5) does show cttyhack is being executed twice with the host name
command in between the two invokations. cttyhack is being executed every
time reliably,
but the shell scripts are not being executed reliably, so maybe there's
nothing wrong with init, and it is a shell issue instead?

Here's the modified inittab snippet:

null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -n -o remount,rw /
null::sysinit:/bin/mount -a
null::sysinit:/sbin/ifconfig lo 127.0.0.1 up
null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
#run the pre init script
::sysinit:/usr/bin/cttyhack /etc/init.d/rc.pre-init
null::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/usr/bin/cttyhack /etc/init.d/rcS 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-01-07 13:14  espakman       New Issue                                    
03-01-07 13:14  espakman       Status                   new => assigned     
03-01-07 13:14  espakman       Assigned To               => BusyBox         
03-02-07 12:38  espakman       Note Added: 0002196                          
11-24-07 18:45  hwstar         Note Added: 0002955                          
11-24-07 18:45  hwstar         Issue Monitored: hwstar                      
11-24-07 20:57  vda            Note Added: 0002956                          
11-24-07 20:57  vda            Status                   assigned => feedback
11-24-07 22:21  hwstar         Note Added: 0002957                          
======================================================================




More information about the busybox-cvs mailing list