Merge authors:
  Dimitri John Ledkov (xnox)
Related merge proposals:
  https://code.launchpad.net/~xnox/upstart/reboot-fix/+merge/219007
  proposed by: Dimitri John Ledkov (xnox)
  review: Approve - James Hunt (jamesodhunt)
------------------------------------------------------------
revno: 1621 [merge]
committer: James Hunt <[email protected]>
branch nick: upstart
timestamp: Thu 2014-05-15 10:24:38 +0100
message:
  * Merge of lp:~xnox/upstart/reboot-fix.
modified:
  ChangeLog
  util/reboot.c


--
lp:upstart
https://code.launchpad.net/~upstart-devel/upstart/trunk

Your team Upstart Reviewers is subscribed to branch lp:upstart.
To unsubscribe from this branch go to 
https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'ChangeLog'
--- ChangeLog	2014-05-07 16:34:44 +0000
+++ ChangeLog	2014-05-09 15:23:36 +0000
@@ -1,3 +1,11 @@
+2014-05-09  Dimitri John Ledkov  <[email protected]>
+
+	* util/reboot.c: only use rebootcommand code path in runlevels 0,
+	6 or when force is specified as per intended documented behavior
+	in the manpage. This corrects the bug when rebootcommand mode was
+	used in error whenever an argument to reboot was passed.
+	(LP: #1174272)
+
 2014-05-07  James Hunt  <[email protected]>
 
 	* Convert calls to deprecated json_object_object_get() to

=== modified file 'util/reboot.c'
--- util/reboot.c	2013-08-22 11:13:41 +0000
+++ util/reboot.c	2014-05-09 15:23:36 +0000
@@ -188,7 +188,7 @@
 		mode = POWEROFF;
 
 	/* Check for rebootcommand to pass in the syscall */
-	if ((mode == REBOOT) && args && *args) {
+	if ((mode == REBOOT) && force && args && *args) {
 		mode = REBOOTCOMMAND;
 		rebootcommand = *args;
 	}

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to