commit:     62b49b2a3ad1c13012305b4d7281d7f6543c70d7
Author:     Doug Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Mon Jan 18 06:57:26 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jan 19 06:09:20 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=62b49b2a

rc: remove use of magic constant and allow OpenVZ to drop to shell

OpenVZ has had console support for a long time now; allow them to use it
to drop to a shell during interactive boot.

 src/rc/rc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/rc/rc.c b/src/rc/rc.c
index 1aae45f..7836341 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -283,9 +283,8 @@ open_shell(void)
 #ifdef __linux__
        const char *sys = rc_sys();
        
-       /* VSERVER and OPENVZ systems cannot really drop to shells */
-       if (sys &&
-           (strcmp(sys, "VSERVER") == 0 || strcmp(sys, "OPENVZ") == 0))
+       /* VSERVER systems cannot really drop to shells */
+       if (sys && strcmp(sys, RC_SYS_VSERVER) == 0)
        {
                execl("/sbin/halt", "/sbin/halt", "-f", (char *) NULL);
                eerrorx("%s: unable to exec `/sbin/halt': %s",

Reply via email to