summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2010-08-05 14:00:00 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-05 19:50:03 +0200
commita042efad57741e90ee78b69c57310858295bf3fc (patch)
treec67f825f3868667eb9464a237f5062ce202a1af4 /src
parent6319292f15478f763777738c9a98faa99ae819c1 (diff)
reboot: handle -p switch properly
https://bugzilla.redhat.com/show_bug.cgi?id=618678
Diffstat (limited to 'src')
-rw-r--r--src/systemctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 1640a60a70..3ca146447a 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -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: