mirror of
https://github.com/systemd/systemd.git
synced 2025-09-13 05:44:40 +03:00
systemctl: whitelist /etc instead of blacklisting /lib to figure out if [Install] is needed
This commit is contained in:
@@ -4157,8 +4157,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
|
|||||||
if (streq(verb, "is-enabled") &&
|
if (streq(verb, "is-enabled") &&
|
||||||
strv_isempty(i->aliases) &&
|
strv_isempty(i->aliases) &&
|
||||||
strv_isempty(i->wanted_by) &&
|
strv_isempty(i->wanted_by) &&
|
||||||
(path_startswith(filename, "/lib") ||
|
!path_startswith(filename, "/etc"))
|
||||||
path_startswith(filename, "/usr")))
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
i->path = filename;
|
i->path = filename;
|
||||||
|
Reference in New Issue
Block a user