forked from pool/systemd
135fa85fb7
- make sure updaters get in the /sbin/init from here - the sub package of the split package will decide which init wins in update case - under openSUSE if it's not systemd, chances are good it's sysvinit - do not list specific sbin_init providers OBS-URL: https://build.opensuse.org/request/show/87397 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=74
22 lines
999 B
Diff
22 lines
999 B
Diff
Index: systemd-36/src/systemctl.c
|
|
===================================================================
|
|
--- systemd-36.orig/src/systemctl.c
|
|
+++ systemd-36/src/systemctl.c
|
|
@@ -4672,10 +4672,13 @@ static int parse_argv(int argc, char *ar
|
|
/* Hmm, so some other init system is
|
|
* running, we need to forward this
|
|
* request to it. For now we simply
|
|
- * guess that it is Upstart. */
|
|
-
|
|
- execv("/lib/upstart/telinit", argv);
|
|
+ * guess that it is Sysvinit or Upstart. */
|
|
|
|
+ if (!access("/lib/sysvinit/telinit", X_OK)) {
|
|
+ execv("/lib/sysvinit/telinit", argv);
|
|
+ } else {
|
|
+ execv("/lib/upstart/telinit", argv);
|
|
+ }
|
|
log_error("Couldn't find an alternative telinit implementation to spawn.");
|
|
return -EIO;
|
|
}
|