diff options
author | Andy Wingo <wingo@pobox.com> | 2015-04-08 08:45:34 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-04-08 08:45:34 +0200 |
commit | a3b23257872fe2f8cf99aa2da008f55ada583bb3 (patch) | |
tree | 5e567add541f736045ca70199089cc423764d321 /src/shared | |
parent | 31ad69aaf459ac5f4d52c604ec2df7cb0793708e (diff) |
Remove SysV compat
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/build.h | 6 | ||||
-rw-r--r-- | src/shared/path-lookup.c | 76 | ||||
-rw-r--r-- | src/shared/path-lookup.h | 4 |
3 files changed, 0 insertions, 86 deletions
diff --git a/src/shared/build.h b/src/shared/build.h index 8b82ede290..b0a5a72467 100644 --- a/src/shared/build.h +++ b/src/shared/build.h @@ -57,12 +57,6 @@ #define _SMACK_FEATURE_ "-SMACK" #endif -#ifdef HAVE_SYSV_COMPAT -#define _SYSVINIT_FEATURE_ "+SYSVINIT" -#else -#define _SYSVINIT_FEATURE_ "-SYSVINIT" -#endif - #ifdef HAVE_LIBCRYPTSETUP #define _LIBCRYPTSETUP_FEATURE_ "+LIBCRYPTSETUP" #else diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index fb2c2c233a..83abf53faa 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -338,77 +338,7 @@ int lookup_paths_init( } if (running_as == SYSTEMD_SYSTEM) { -#ifdef HAVE_SYSV_COMPAT - /* /etc/init.d/ compatibility does not matter to users */ - - e = getenv("SYSTEMD_SYSVINIT_PATH"); - if (e) { - p->sysvinit_path = path_split_and_make_absolute(e); - if (!p->sysvinit_path) - return -ENOMEM; - } 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) { - p->sysvrcnd_path = path_split_and_make_absolute(e); - if (!p->sysvrcnd_path) - return -ENOMEM; - } 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."); - strv_free(p->sysvinit_path); - p->sysvinit_path = NULL; - } - - 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."); - strv_free(p->sysvrcnd_path); - p->sysvrcnd_path = NULL; - } -#else log_debug("SysV init scripts and rcN.d links support disabled"); -#endif } return 0; @@ -419,12 +349,6 @@ void lookup_paths_free(LookupPaths *p) { strv_free(p->unit_path); p->unit_path = NULL; - -#ifdef HAVE_SYSV_COMPAT - strv_free(p->sysvinit_path); - strv_free(p->sysvrcnd_path); - p->sysvinit_path = p->sysvrcnd_path = NULL; -#endif } int lookup_paths_init_from_scope(LookupPaths *paths, diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h index f1925eef69..2e0d3f7bda 100644 --- a/src/shared/path-lookup.h +++ b/src/shared/path-lookup.h @@ -27,10 +27,6 @@ typedef enum UnitFileScope UnitFileScope; typedef struct LookupPaths { char **unit_path; -#ifdef HAVE_SYSV_COMPAT - char **sysvinit_path; - char **sysvrcnd_path; -#endif } LookupPaths; typedef enum SystemdRunningAs { |