mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-02-16 06:19:40 +07:00
main: redirection to telinit is unnecessary if sysv compat is disabled
This commit is contained in:
parent
9d76d730ef
commit
058dc6f379
@ -1021,6 +1021,7 @@ int main(int argc, char *argv[]) {
|
|||||||
dual_timestamp initrd_timestamp = { 0ULL, 0ULL };
|
dual_timestamp initrd_timestamp = { 0ULL, 0ULL };
|
||||||
char systemd[] = "systemd";
|
char systemd[] = "systemd";
|
||||||
|
|
||||||
|
#ifdef HAVE_SYSV_COMPAT
|
||||||
if (getpid() != 1 && strstr(program_invocation_short_name, "init")) {
|
if (getpid() != 1 && strstr(program_invocation_short_name, "init")) {
|
||||||
/* This is compatibility support for SysV, where
|
/* This is compatibility support for SysV, where
|
||||||
* calling init as a user is identical to telinit. */
|
* 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");
|
log_error("Failed to exec " SYSTEMCTL_BINARY_PATH ": %m");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If we get started via the /sbin/init symlink then we are
|
/* If we get started via the /sbin/init symlink then we are
|
||||||
called 'init'. After a subsequent reexecution we are then
|
called 'init'. After a subsequent reexecution we are then
|
||||||
|
Loading…
Reference in New Issue
Block a user