chiark / gitweb /
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 1640a60..3ca1464 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: