From 65457142f12ecc4bb39fad51b73b9d3e6eac4af5 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Mon, 22 Aug 2011 14:58:50 +0200 Subject: initctl: check for kexec_loaded when reboot is requested through initctl --- src/initctl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/initctl.c') diff --git a/src/initctl.c b/src/initctl.c index f36f1cc704..eaa717ad91 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -93,6 +93,8 @@ static const char *translate_runlevel(int runlevel, bool *isolate) { for (i = 0; i < ELEMENTSOF(table); i++) if (table[i].runlevel == runlevel) { *isolate = table[i].isolate; + if (runlevel == '6' && kexec_loaded()) + return SPECIAL_KEXEC_TARGET; return table[i].special; } -- cgit v1.2.3-54-g00ecf