summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-28 23:42:47 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-28 23:42:47 +0200
commit058dc6f3793af16feae92fa5ddf2a5c58ad5c905 (patch)
tree8d11ecdff5aeb5bc76a71e060edd0361ee57adcc /src/main.c
parent9d76d730ef2f59425c4c75cb55245c3b7777a445 (diff)
main: redirection to telinit is unnecessary if sysv compat is disabled
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 25b6e87de3..f8682d2456 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1021,6 +1021,7 @@ int main(int argc, char *argv[]) {
dual_timestamp initrd_timestamp = { 0ULL, 0ULL };
char systemd[] = "systemd";
+#ifdef HAVE_SYSV_COMPAT
if (getpid() != 1 && strstr(program_invocation_short_name, "init")) {
/* This is compatibility support for SysV, where
* calling init as a user is identical to telinit. */
@@ -1030,6 +1031,7 @@ int main(int argc, char *argv[]) {
log_error("Failed to exec " SYSTEMCTL_BINARY_PATH ": %m");
return 1;
}
+#endif
/* If we get started via the /sbin/init symlink then we are
called 'init'. After a subsequent reexecution we are then