-DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
-DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
-DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
+ -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
-I $(top_srcdir)/src
rootbin_PROGRAMS = \
* /sbin/shutdown argv[2..] message
-* exec /sbin/telinit from init
-
* discuss NOTIFY_SOCKET, make it configurable? security implications?
Regularly:
FDSet *fds = NULL;
bool reexecute = false;
+ if (getpid() != 1 && strstr(program_invocation_short_name, "init")) {
+ /* This is compatbility support for SysV, where
+ * calling init as a user is identical to telinit. */
+
+ errno = -ENOENT;
+ execv(SYSTEMCTL_BINARY_PATH, argv);
+ log_error("Failed to exec " SYSTEMCTL_BINARY_PATH ": %m");
+ return 1;
+ }
+
log_show_color(true);
log_show_location(false);
log_set_max_level(LOG_DEBUG);