[BusyBox] Joy and Compatibility

busybox at rich-paul.net busybox at rich-paul.net
Tue Jul 26 21:47:34 MDT 2005


I use Gentoo Linux, and have been playing with the bootstrap process a
bit ... several times, when I've been experimenting or tweaking, I've
accidentally left proc mounted and exec'd init.  When Gentoo's boot
scripts fail to mount proc, it results in an unceremonious reboot.  None
of this, of course is your problem.

But then today, I noticed that I had a tmpfs mounted on /dev, and a
second tmpfs mounted on top of it.

This made me wonder if there would be any value to adding a switch
that would request an idempotent semantic from mount, e.g.
	if (already_mounted())
		exit(0);
	else if (then_mount_the_silly_thing())
		exit(0);
	else
		exit(1);

It seems much cleaner to me than either adding logic to the init scripts
to test before running mount or grepping mount's error message to try to
determine why it failed.

But there is one drawback to the scheme:  util-linux doesn't have it.
Not a problem for me, I haven't found any situation that busy-mount
can't handle, but I figured I should check before submitting an
incompatable feature.

In a similar vein, I've noticed that busy-mount doesn't grok --move or
--bind, and util-mount doesn't grok -omove or -obind.  So I thought I
might clean up my Kompatablity Karma by explaining --move and --bind to
busy-mount.

Anyway, let me know what you think.

Regards,
Rich
	



-- 
Don't blame me, I voted libertarian.
http://radical-centrist.blogspot.com


More information about the busybox mailing list