chiark / gitweb /
mount: failure to mount cgroup hierarchies should not be fatal
[elogind.git] / src / systemctl.c
index 0a72874145f0c620ac66a904a9fb4cced8e55c4c..d1d73bfa01397d5af617dbd69d6cd39454db13f3 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;
@@ -4152,6 +4152,15 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
                 return -ENOENT;
         }
 
+        /* Consider unit files stored in /lib and /usr always enabled
+         * if they have no [Install] data. */
+        if (streq(verb, "is-enabled") &&
+            strv_isempty(i->aliases) &&
+            strv_isempty(i->wanted_by) &&
+            (path_startswith(filename, "/lib") ||
+             path_startswith(filename, "/usr")))
+                return 1;
+
         i->path = filename;
 
         if ((r = config_parse(filename, f, NULL, items, true, i)) < 0) {