Problems at shutdown

Bernhard Fischer rep.nop at aon.at
Wed Nov 29 12:17:58 UTC 2006


On Wed, Nov 29, 2006 at 11:14:48AM +0000, Andy Green wrote:
>Denis Vlasenko wrote:
>
>>>>errors, esp the umount -a -r does not work here (try it on the 
>>>>commandline).
>
>>>I get my message from rcK (hooray).  But I don't hear anything from 
>>>anything else, including umount.  I tried it on the command line and it 
>>>just gave me the usage information.  I understand what this is trying to 
>>>do here (in the inittab) - how can I get it to work?
>
>>Buggy init, probably. Somebody need to stick a lot of printf's in it,
>
>I found out why umount -a did not work for me and probably for Peter -- 
>there is a config option needed to enable it 
>(ENABLE_FEATURE_UMOUNT_ALL).  Linux System Utilities | umount | umount 
>-a option.  The umount --help shows the -a whether it is enabled or not 
>at the moment.
>
>While mentioning that init --help does not document -q which is needed 
>to read in /etc/inittab after changes.
>
>I attach a tiny patch to disable the -a help on umount when not 
>configured, and to document -q on init.
>
>-Andy

>diff -urN busybox-1.2.2.1-pre/include/usage.h busybox-1.2.2.1/include/usage.h
>--- busybox-1.2.2.1-pre/include/usage.h	2006-11-28 13:44:01.000000000 +0000
>+++ busybox-1.2.2.1/include/usage.h	2006-11-29 11:03:00.000000000 +0000
>@@ -1223,9 +1223,11 @@
> 	"\t\tthe specified value. Default is 128"
> 
> #define init_trivial_usage \
>-	""
>+	"[-q]"
> #define init_full_usage \
>-	"Init is the parent of all processes."
>+	"Init is the parent of all processes.\n\n" \
>+	"Option:\n" \
>+	"\t-q\tRe-read /etc/inittab"
> #define init_notes_usage \
> "This version of init is designed to be run only by the kernel.\n" \
> "\n" \
>@@ -3205,11 +3207,19 @@
> #else
> #  define USAGE_MOUNT_FORCE(a)
> #endif
>+
>+#if ENABLE_FEATURE_UMOUNT_ALL
>+#  define USAGE_UMOUNT_ALL(a) a
>+#else
>+#  define USAGE_UMOUNT_ALL(a)
>+#endif

no.

>+
> #define umount_trivial_usage \
> 	"[flags] FILESYSTEM|DIRECTORY"
> #define umount_full_usage \
> 	"Unmount file systems\n" \
>-	"\nFlags:\n" "\t-a\tUnmount all file systems" \
>+	"\nFlags:\n" \
->+	USAGE_UMOUNT_ALL("\t-a\tUnmount all file systems") \
+>+	USE_FEATURE_UMOUNT_ALL("\t-a\tUnmount all file systems") \
-> 	USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \
+> 	USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \
> 	"\n\t-r\tTry to remount devices as read-only if mount is busy" \
> 	"\n\t-l\tLazy umount (detach filesystem)" \
>

Please resend (would be awesome if you could cleanup the other uses of
USAGE_MTAB while you're at it), thanks



More information about the busybox mailing list