[BusyBox] Init doesn't run it's scripts
Joel Bjurström
maxxflow at gmail.com
Sun May 29 15:20:54 UTC 2005
Hi.
I have a problem, busybox init don't want to run my shutdown/reboot-scripts...
Here's my inittab:
--------------------------------------
::sysinit:/etc/rc.d/rc.startup
::respawn:-/bin/sh
# Start "askfirst" shells on /dev/tty2-4
tty2::askfirst:-/bin/sh
tty3::askfirst:-/bin/sh
tty4::askfirst:-/bin/sh
# Stuff to do before shutdown
::ctrlaltdel:/etc/rc.d/rc.reboot
::shutdown:/etc/rc.d/rc.shutdown
--------------------------------------
rc.shutdown: (rc.reboot is a symbolic link to rc.shutdown)
--------------------------------------
#!/bin/sh
#
# /etc/rc.d/rc.shutdown: System shutdown script.
#
# maxxflow, <maxxflow at gmail.com>
#
# Set linefeed mode to avoid staircase effect.
stty onlcr
# Find out how we were called.
case "$0" in
rc.shutdown ) command="poweroff" ;;
rc.reboot ) command="reboot" ;;
esac
# Kill udhcpc so the DHCP leases can be returned:
killall -15 udhcpc 2> /dev/null
# Kill all processes.
killall5 -15
sleep 5
killall5 -9
# Turn off swap
echo "Turning off swap..."
swapoff -a
sync
# As we run from a ramdisk, we don't need to unmount it.
# G'bye...
$command
--------------------------------------
When i run "halt" or press Ctrl+Alt+Del, the system reboots, without
running the shutdown/reboot script.
But it does run rc.startup on boot...
What's wrong?
--
/maxxflow
maxxflow at gmail.com
icq #285448265
jabber: maxxflow at dotgeek.org
msn: maxxflow at gmail.com
http://maxxflow.com
More information about the busybox
mailing list