1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

systemctl: whitelist /etc instead of blacklisting /lib to figure out if [Install] is needed

This commit is contained in:
Lennart Poettering 2011-04-27 22:30:28 +02:00
parent ecb963cc40
commit e190aa0be1

View File

@ -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;