]> err.no Git - systemd/commitdiff
reboot: handle -p switch properly
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 5 Aug 2010 12:00:00 +0000 (14:00 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 5 Aug 2010 17:50:03 +0000 (19:50 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=618678

src/systemctl.c

index 1640a60a70960131fc91a3adc9015665f4bb26a9..3ca146447aa4c181b9c2e127aaaa2766f206a6e4 100644 (file)
@@ -3933,7 +3933,8 @@ static int halt_parse_argv(int argc, char *argv[]) {
                         break;
 
                 case 'p':
-                        arg_action = ACTION_POWEROFF;
+                        if (arg_action != ACTION_REBOOT)
+                                arg_action = ACTION_POWEROFF;
                         break;
 
                 case ARG_REBOOT: