From 52c002150a34c07a59369ee952bcd3a1f8f316ca Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Sat, 2 Jul 2011 23:09:59 +0200 Subject: 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 --- src/shutdownd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shutdownd.c') 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] = '-'; -- cgit v1.2.3-54-g00ecf