[systemd-commits] src/systemctl

Lennart Poettering lennart at kemper.freedesktop.org
Wed Feb 11 11:37:41 PST 2015


 src/systemctl/systemctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c31c4324c5120d9b38f8a5e39623c8242ee001e0
Author: Michael Olbrich <m.olbrich at pengutronix.de>
Date:   Sun Feb 8 20:29:50 2015 +0100

    systemctl: don't update the reboot parameter if none is given
    
    Otherwise systemd-reboot.service will remove the parameter that was set
    before. This was broken in commit "b986229efe2cc96157aa14c37bab7843311bbef1
    systemctl: bugfix for systemctl reboot command with argument"

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 2d70ff1..7b81a9c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2993,7 +2993,7 @@ static int start_special(sd_bus *bus, char **args) {
                 return -EPERM;
         }
 
-        if (a == ACTION_REBOOT) {
+        if (a == ACTION_REBOOT && args[1]) {
                 r = update_reboot_param_file(args[1]);
                 if (r < 0)
                         return r;



More information about the systemd-commits mailing list