summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-23 20:38:53 +0100
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:29 +0200
commit1dfa3076cfbb00c48a26892b72148265ea3b69f3 (patch)
treecf3af34017ca416cbc560e7feb95e0e13a6e8eba /src
parent4143c6c305fb7075aa071bcc8e7cf0f92f41e146 (diff)
core: drop SysV paths from path-lookup logic
We don't need it anymore, give that sysv-generator can determine the path on its own now.
Diffstat (limited to 'src')
-rw-r--r--src/shared/path-lookup.c76
-rw-r--r--src/shared/path-lookup.h4
2 files changed, 0 insertions, 80 deletions
diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
index 5410620725..ac22a27ccb 100644
--- a/src/shared/path-lookup.c
+++ b/src/shared/path-lookup.c
@@ -338,77 +338,6 @@ int lookup_paths_init(
p->unit_path = strv_free(p->unit_path);
}
- if (running_as == MANAGER_SYSTEM) {
-#ifdef HAVE_SYSV_COMPAT
- /* /etc/init.d/ compatibility does not matter to users */
-
- e = getenv("SYSTEMD_SYSVINIT_PATH");
- if (e) {
- r = path_split_and_make_absolute(e, &p->sysvinit_path);
- if (r < 0)
- return r;
- } else
- p->sysvinit_path = NULL;
-
- if (strv_isempty(p->sysvinit_path)) {
- strv_free(p->sysvinit_path);
-
- p->sysvinit_path = strv_new(
- SYSTEM_SYSVINIT_PATH, /* /etc/init.d/ */
- NULL);
- if (!p->sysvinit_path)
- return -ENOMEM;
- }
-
- e = getenv("SYSTEMD_SYSVRCND_PATH");
- if (e) {
- r = path_split_and_make_absolute(e, &p->sysvrcnd_path);
- if (r < 0)
- return r;
- } else
- p->sysvrcnd_path = NULL;
-
- if (strv_isempty(p->sysvrcnd_path)) {
- strv_free(p->sysvrcnd_path);
-
- p->sysvrcnd_path = strv_new(
- SYSTEM_SYSVRCND_PATH, /* /etc/rcN.d/ */
- NULL);
- if (!p->sysvrcnd_path)
- return -ENOMEM;
- }
-
- if (!path_strv_resolve_uniq(p->sysvinit_path, root_dir))
- return -ENOMEM;
-
- if (!path_strv_resolve_uniq(p->sysvrcnd_path, root_dir))
- return -ENOMEM;
-
- if (!strv_isempty(p->sysvinit_path)) {
- _cleanup_free_ char *t = strv_join(p->sysvinit_path, "\n\t");
- if (!t)
- return -ENOMEM;
- log_debug("Looking for SysV init scripts in:\n\t%s", t);
- } else {
- log_debug("Ignoring SysV init scripts.");
- p->sysvinit_path = strv_free(p->sysvinit_path);
- }
-
- if (!strv_isempty(p->sysvrcnd_path)) {
- _cleanup_free_ char *t =
- strv_join(p->sysvrcnd_path, "\n\t");
- if (!t)
- return -ENOMEM;
-
- log_debug("Looking for SysV rcN.d links in:\n\t%s", t);
- } else {
- log_debug("Ignoring SysV rcN.d links.");
- p->sysvrcnd_path = strv_free(p->sysvrcnd_path);
- }
-#else
- log_debug("SysV init scripts and rcN.d links support disabled");
-#endif
- }
return 0;
}
@@ -417,11 +346,6 @@ void lookup_paths_free(LookupPaths *p) {
assert(p);
p->unit_path = strv_free(p->unit_path);
-
-#ifdef HAVE_SYSV_COMPAT
- p->sysvinit_path = strv_free(p->sysvinit_path);
- p->sysvrcnd_path = strv_free(p->sysvrcnd_path);
-#endif
}
int lookup_paths_init_from_scope(LookupPaths *paths,
diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h
index 26c83d6111..c53d293072 100644
--- a/src/shared/path-lookup.h
+++ b/src/shared/path-lookup.h
@@ -24,10 +24,6 @@
typedef struct LookupPaths {
char **unit_path;
-#ifdef HAVE_SYSV_COMPAT
- char **sysvinit_path;
- char **sysvrcnd_path;
-#endif
} LookupPaths;
typedef enum ManagerRunningAs {