summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-07-13 14:44:52 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-13 14:46:14 +0200
commita504223d9a448ab338e369997c39c04067c8f906 (patch)
treea840ab88cf7761e54c2e41ca54c339e25420f307 /src
parent910212e738e5ecdc0ceebfcc5009d688415eaefc (diff)
main: only reopen /dev/console if we switch-root to a custom init
There's no point in reopening /dev/console if we reopen it anyway afterwards.
Diffstat (limited to 'src')
-rw-r--r--src/core/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 87cb4ffb5c..ae3769be52 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1673,9 +1673,6 @@ finish:
* rebooted while we do that */
watchdog_close(true);
- /* Reopen the console */
- make_console_stdio();
-
if (switch_root_dir) {
/* Kill all remaining processes from the initrd */
broadcast_signal(SIGTERM);
@@ -1733,6 +1730,9 @@ finish:
fds = NULL;
}
+ /* Reopen the console */
+ make_console_stdio();
+
for (j = 1, i = 1; j < argc; j++)
args[i++] = argv[j];
args[i++] = NULL;