[BusyBox] init(tab) trouble
Geoffrey Espin
espin at idiom.com
Fri Jan 11 10:41:03 UTC 2002
I'm using Busybox 60.2 with ash and inittab
::sysinit:/etc/init.d/rcS
::respawn:-/bin/sh
tty2::askfirst:-/bin/sh
# Stuff to do before rebooting
::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/ifconfig eth0 down
::shutdown:/bin/umounot -a -r
#::shutdown:/sbin/swapoff -a
My /etc/rcS runs thru /etc/init.d/*, where "/etc/init.d/S05web.sh" contains:
#!/bin/sh
THTTPD=/usr/local/sbin/thttpd_wrapper
if [ -x ${THTTPD} ] ; then
${THTTPD} &
echo -n " thttpd"
fi
And thttpd_wrapper contains:
#!/bin/sh
while true ; do
/usr/local/sbin/thttpd -D -C /etc/thttpd.conf
echo "$0: thttpd exited... restarting..."
sleep 5
done
The very last thing my rcS does is a "ps aux" and the web server and
wrapper is running. However, when my ash shell prompt appears,
I do a "ps" and those two jobs are long gone!
Before:
...
Finished /etc/init.d/S05web.sh .
...
Finished /etc/init.d/S06misc.sh .
PID Uid Stat Command
1 root S init
2 root S [keventd]
3 root S [ksoftirqd_CPU0]
4 root S [kswapd]
5 root S [bdflush]
6 root S [kupdated]
7 root S [mtdblockd]
8 root S [khubd]
205 root S /bin/sh /etc/init.d/rcS
399 root S [jffs2_gcd_mtd2]
425 root S [rpciod]
427 root S syslogd
441 root S /bin/sh /usr/local/sbin/thttpd_wrapper
450 root D /usr/local/sbin/thttpd -D -C /etc/thttpd.conf
459 root R ps aux
Finished /etc/init.d/rcS .
BusyBox v0.60.2 (2001.12.31-17:15+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
Fri Jan 11 08:45:54 PST 2002
# ps aux
PID Uid Stat Command
1 root S init
2 root S [keventd]
3 root R [ksoftirqd_CPU0]
4 root S [kswapd]
5 root S [bdflush]
6 root S [kupdated]
7 root S [mtdblockd]
8 root S [khubd]
399 root S [jffs2_gcd_mtd2]
425 root S [rpciod]
427 root S syslogd
462 root S -sh
467 root R ps aux
#
Some elementary Unix thing I'm sure I've missed in my 20 years... :-(
TIA.
Geoff
--
Geoffrey Espin
espin at idiom.com
More information about the busybox
mailing list