chiark / gitweb /
add --with-telinit=PATH configure option
authorCristian Rodríguez <crrodriguez@opensuse.org>
Sat, 23 Mar 2013 00:04:53 +0000 (21:04 -0300)
committerLennart Poettering <lennart@poettering.net>
Sat, 23 Mar 2013 00:44:56 +0000 (01:44 +0100)
Distributions that never shipped upstart do not have
"telinit" in /lib/upstart/..

Defaults to /lib/upstart/telinit so there is no change
for systems existing installs.

configure.ac
src/systemctl/systemctl.c

index 79a4ec452113d804815704eaf7dac71919c3a3bb..f1bf7582fd8367a7ca89cf2bbcc515a745798a4c 100644 (file)
@@ -683,6 +683,16 @@ AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
 AC_SUBST(KBD_LOADKEYS)
 AC_SUBST(KBD_SETFONT)
 
+AC_ARG_WITH(telinit,
+        AS_HELP_STRING([--with-telinit=PATH],
+                [Path to telinit]),
+        [TELINIT="$withval"],
+        [TELINIT="/lib/upstart/telinit"])
+
+AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
+
+AC_SUBST(TELINIT)
+
 # ------------------------------------------------------------------------------
 have_myhostname=no
 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
index 1ea0e4e7ec547699ad25f0d223f6cbba20ef03bb..edd136addddf9bd10dbdfe8ab29c3f568c71f5a0 100644 (file)
@@ -4918,7 +4918,7 @@ static int parse_argv(int argc, char *argv[]) {
                                  * request to it. For now we simply
                                  * guess that it is Upstart. */
 
-                                execv("/lib/upstart/telinit", argv);
+                                execv(TELINIT, argv);
 
                                 log_error("Couldn't find an alternative telinit implementation to spawn.");
                                 return -EIO;