summaryrefslogtreecommitdiff
path: root/src/shutdownd.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2011-07-02 23:09:59 +0200
committerMichal Schmidt <mschmidt@redhat.com>2011-07-03 00:12:16 +0200
commit52c002150a34c07a59369ee952bcd3a1f8f316ca (patch)
tree8bf5fb00378c1d38e5a5a31abfa46626941cdb67 /src/shutdownd.c
parent1a63987788624a8819b94b199aa6748665f5e957 (diff)
shutdown: respect the dry run option '-k'
Don't do the actual power-off/reboot when '-k' is passed to shutdown. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=624149
Diffstat (limited to 'src/shutdownd.c')
-rw-r--r--src/shutdownd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shutdownd.c b/src/shutdownd.c
index 13819417c3..7fd9573b2f 100644
--- a/src/shutdownd.c
+++ b/src/shutdownd.c
@@ -348,7 +348,7 @@ finish:
if (unlink_nologin)
unlink("/run/nologin");
- if (exec_shutdown) {
+ if (exec_shutdown && !c.dry_run) {
char sw[3];
sw[0] = '-';