chiark / gitweb /
systemctl: whitelist /etc instead of blacklisting /lib to figure out if [Install...
[elogind.git] / src / systemctl.c
index 39901c3674c92317d89f48ee385ce5436e1d8bcc..10c6319b4e840a21c8786eaadb74bfa5f1d89f6c 100644 (file)
@@ -4081,7 +4081,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
         }
 
         if (!f) {
-#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) && defined (HAVE_SYSV_COMPAT)
+#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT)
 
                 if (endswith(i->name, ".service")) {
                         char *sysv;
@@ -4157,8 +4157,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
         if (streq(verb, "is-enabled") &&
             strv_isempty(i->aliases) &&
             strv_isempty(i->wanted_by) &&
-            (path_startswith(filename, "/lib") ||
-             path_startswith(filename, "/usr")))
+            !path_startswith(filename, "/etc"))
                 return 1;
 
         i->path = filename;