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"

(cherry picked from commit c31c4324c5)
This commit is contained in:
Michael Olbrich
2015-03-23 02:08:05 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent e341873c56
commit 27834dd75b
+1 -1
View File
@@ -3031,7 +3031,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;