[BusyBox] init script and umount

Erik Andersen andersen at codepoet.org
Wed Aug 6 09:02:05 UTC 2003


On Wed Jul 30, 2003 at 09:35:15PM +0200, David Boyes wrote:
> Hi all,
> 
> I have been having a problem with shutdown, or rather restart after shutdown, 
> on a busybox system using a conventional hard disk as the root device.  After 
> looking at the sources, the CVS and newsgroups, I am not sure if this is a 
> bug, a feature or just a result of the combination I am using.  The problem 
> is that for recent versions disk is always "unclean" and needs to be fsck'ed.
> 
> The problem seems to be in init.c.  Apparently the decision was made between 
> 60.3 and 60.5 to put the run_actions() before the kill() calls which pull 
> down all but the shutdown processes, in order that users can invoke scripts 
> from inittab in a normal environment.  The problem on my system is that this 
> does not permit "umount -a -r" given by a user to unmount and remount the 
> root disk, so the next start sees the disk as badly unmounted.

Have you tried adding something like this to your /etc/inittab file?

	# Stuff to do before rebooting
	null::shutdown:/usr/bin/killall klogd
	null::shutdown:/usr/bin/killall syslogd
	null::shutdown:/bin/umount -a -r
	null::shutdown:/sbin/swapoff -a

Since I think that is what you are trying to do, right?

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the busybox mailing list