From 437dd9c51167f085315a134253e8c4f18c63138d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 16 Mar 2021 22:45:53 +0000 Subject: Do not hardcode /libexec libexecdir So that distributions can use the --libexecdir configure parameter. * configure.ac (AC_CONFIG_FILES): Add daemons/runsystem.hurd.sh. * config/ttys: Rename to ttys.in, replace /libexec with @libexecdir@. * config/Makefile (ttys): Generate from ttys.in * daemons/runsystem.hurd.sh.in (prefix): Define to @prefix@. (exec_prefix): Define to @exec_prefix@. (RUNCOM, RUNTTYS): Replace /libexec with @libexecdir@. * init/Makefile (init-CPPFLAGS): Define LIBEXECDIR. * init/init.c (main): Use LIBEXECDIR instead of hardcoding /libexec. * startup/Makefile (startup-CPPFLAGS): Define LIBEXECDIR. * startup/startup.c (start_child, launch_something): Use LIBEXECDIR instead of hardcoding /libexec. --- startup/startup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'startup/startup.c') diff --git a/startup/startup.c b/startup/startup.c index 00d58989..9faeb462 100644 --- a/startup/startup.c +++ b/startup/startup.c @@ -1261,7 +1261,7 @@ start_child (const char *prog, char **progargs) if (progargs == 0) { - const char *argv[] = { "/libexec/console-run", prog, 0 }; + const char *argv[] = { LIBEXECDIR "/console-run", prog, 0 }; err = argz_create ((char **) argv, &args, &arglen); } else @@ -1271,7 +1271,7 @@ start_child (const char *prog, char **progargs) ++argc; { const char *argv[2 + argc + 1]; - argv[0] = "/libexec/console-run"; + argv[0] = LIBEXECDIR "/console-run"; argv[1] = prog; argv[2 + argc] = 0; while (argc-- > 0) @@ -1347,7 +1347,7 @@ launch_something (const char *why) static unsigned int try; static const char *const tries[] = { - "/libexec/runsystem", + LIBEXECDIR "/runsystem", _PATH_BSHELL, "/bin/shd", /* XXX */ }; -- cgit v1.2.3