Fix compile on Linux.
This commit is contained in:
parent
15cf41e713
commit
e55cb5dd5b
@ -287,10 +287,10 @@ static void sulogin (bool cont)
|
|||||||
sigset_t old;
|
sigset_t old;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
char *e = getenv ("RC_SYS");
|
const char *sys = rc_sys ();
|
||||||
|
|
||||||
/* VSERVER and OPENVZ systems cannot do a sulogin */
|
/* VSERVER and OPENVZ systems cannot do a sulogin */
|
||||||
if (e && (strcmp (e, "VSERVER") == 0 || strcmp (e, "OPENVZ") == 0) {
|
if (sys && (strcmp (sys, "VSERVER") == 0 || strcmp (sys, "OPENVZ") == 0)) {
|
||||||
execl ("/sbin/halt", "/sbin/halt", "-f", (char *) NULL);
|
execl ("/sbin/halt", "/sbin/halt", "-f", (char *) NULL);
|
||||||
eerrorx ("%s: unable to exec `/sbin/halt': %s", applet, strerror (errno));
|
eerrorx ("%s: unable to exec `/sbin/halt': %s", applet, strerror (errno));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user