2013-01-10 15:20:01 +01:00
|
|
|
Index: systemd-195/src/systemctl/systemctl.c
|
2011-10-11 17:59:42 +02:00
|
|
|
===================================================================
|
2013-01-10 15:20:01 +01:00
|
|
|
--- systemd-195.orig/src/systemctl/systemctl.c
|
|
|
|
+++ systemd-195/src/systemctl/systemctl.c
|
|
|
|
@@ -4678,10 +4678,13 @@ static int parse_argv(int argc, char *ar
|
2011-10-11 17:59:42 +02:00
|
|
|
/* 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;
|
|
|
|
}
|