systemctl: always consider unit files with no [Install] section but stored in /lib enabled

This commit is contained in:
Lennart Poettering 2011-04-16 03:29:54 +02:00
parent e02cd6f7e0
commit 3d3961f267
2 changed files with 24 additions and 14 deletions

29
TODO
View File

@ -7,8 +7,6 @@ F15:
* NM should pull in network.target (PENDING)
https://bugzilla.redhat.com/show_bug.cgi?id=692008
* ntpd should pull in time-sync.target. (PENDING)
* bluetooth should be possible to disable (PENDING)
* add fstab fields to add wait timeouts, change Wants to Requires by local-fs.target
@ -19,16 +17,25 @@ F15:
* 0595f9a1c182a84581749823ef47c5f292e545f9 is borked, freezes shutdown
(path: after installing inotify watches, recheck file again to fix race)
* be nice to ingo
* get writev() /dev/kmsg support into the F15 kernel
https://lkml.org/lkml/2011/4/6/473
patched merged into -mm
* fix sd_is_socket() invocation in dbus
* fix default timeout values mentioned in man page
* New CK release, with sysinit.target dropping and TTY loop
* New Avahi package, enable it by default
* don't trim empty cgroups
https://bugzilla.redhat.com/show_bug.cgi?id=678555
Features:
* use pivot_root on shutdown so that we can unmount the root directory.
* make sure multiple sockets in a .socket file appear in the order they are listed
currently we get:
[Socket]
@ -37,15 +44,12 @@ Features:
* fix alsa mixer restore to not print error when no config is stored
* don't trim empty cgroups
https://bugzilla.redhat.com/show_bug.cgi?id=678555
* show enablement status in systemctl status
* write blog stories about:
- the blame game: systemd-analyze
- enabling dbus services
- status update
- you are a distro: why switch?
* allow port = 0 in .socket units
@ -53,8 +57,6 @@ Features:
* introduce /usr/lib/binfmt.d/, /usr/lib/tmpfiles.d/
* in pam_systemd: don't rely on /proc/self/loginuid in a container (check if audit caps are there)
* take BSD file lock on tty devices when using them?
* avoid any flag files, or readahead files in /, we need to support r/o /
@ -113,8 +115,6 @@ Features:
* Support --test based on current system state
* consider services with no [Install] section and stored in /lib enabled by "systemctl is-enabled"
* systemctl enable as D-Bus call
* consider services with any kind of link in /etc/systemd/system enabled
@ -150,8 +150,9 @@ Features:
* configurable jitter for timer events
* Support ProcessNeededForShutdown=true to allow stuff like mdmon
to be killed very late after the rootfs is read only (?)
* Support ProcessNeededForShutdown=true to allow stuff like mdmon to
be killed very late after the rootfs is read only? If implement pass
this to shutdown binary via command line argument.
* Integrate "mdadm --wait-clean". Maybe just let SIGTERM to mdmon trigger the
needed action

View File

@ -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) {