Hello,
I have received this bug-report:
https://bugzilla.redhat.com/show_bug.cgi?id=840492
In short shutdown accepts some old options which than ignores, but if
there is no other "real" option (like -h), shutdown performs default
action, which is entering runlevel 1.
I think it would be better if it exits with error message in this case.
Regards
Lukas
diff --git a/util/shutdown.c b/util/shutdown.c
index 2ef847a..dcffc65 100644
--- a/util/shutdown.c
+++ b/util/shutdown.c
@@ -262,6 +262,13 @@ main (int argc,
if (! args)
exit (1);
+ /* Check if user specified some reasonable action */
+ if (! (runlevel || cancel || warn_only)) {
+ fprintf (stderr, _("%s: one of -r -h -H -P -c -k expected\n"), program_name);
+ nih_main_suggest_help ();
+ exit (1);
+ }
+
/* If the runlevel wasn't given explicitly, set it to 1 so we go
* down into single-user mode.
*/
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel