summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-01-04 21:48:47 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-04 23:26:20 +0100
commitb1c4ca25bf58e1925012d1dcdd83d61cecbf87fb (patch)
tree564526d2532f87ea2b90d974b87e0b5c4ce6619d /src
parent46a2911bf2780f616396df5671dd901cc7cb54fd (diff)
build-sys: make rc-local support part of SYSV compat
This also drops automatic selection of the rc local scripts based on the local distro. Distributions now should specify the paths of the rc-local and halt-local scripts on the configure command line.
Diffstat (limited to 'src')
-rw-r--r--src/rc-local-generator/rc-local-generator.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c
index c219e77047..448980ba2d 100644
--- a/src/rc-local-generator/rc-local-generator.c
+++ b/src/rc-local-generator/rc-local-generator.c
@@ -28,13 +28,13 @@
#include "util.h"
#include "mkdir.h"
-#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-#define SCRIPT_PATH_START "/etc/rc.d/rc.local"
-#elif defined(TARGET_SUSE)
-#define SCRIPT_PATH_START "/etc/init.d/boot.local"
+#ifndef RC_LOCAL_SCRIPT_PATH_START
+#define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.d/rc.local"
#endif
-#define SCRIPT_PATH_STOP "/sbin/halt.local"
+#ifndef RC_LOCAL_SCRIPT_PATH_STOP
+#define RC_LOCAL_SCRIPT_PATH_STOP "/sbin/halt.local"
+#endif
const char *arg_dest = "/tmp";
@@ -97,14 +97,14 @@ int main(int argc, char *argv[]) {
umask(0022);
- if (file_is_executable(SCRIPT_PATH_START)) {
+ if (file_is_executable(RC_LOCAL_SCRIPT_PATH_START)) {
log_debug("Automatically adding rc-local.service.");
if (add_symlink("rc-local.service", "multi-user.target") < 0)
r = EXIT_FAILURE;
}
- if (file_is_executable(SCRIPT_PATH_STOP)) {
+ if (file_is_executable(RC_LOCAL_SCRIPT_PATH_STOP)) {
log_debug("Automatically adding halt-local.service.");
if (add_symlink("halt-local.service", "final.target") < 0)