install: follow config_path symlink (#3362)
Under NixOS, the config_path /etc/systemd/system is a symlink to /etc/static/systemd/system. Commands such as `systemctl list-unit-files` and `systemctl is-enabled` did not work as the symlink was not followed. This does not affect how symlinks are treated within the config_path directory.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
e73529f9dd
commit
1cd1dab98c
@@ -777,7 +777,7 @@ static int find_symlinks(
|
||||
assert(config_path);
|
||||
assert(same_name_link);
|
||||
|
||||
fd = open(config_path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
|
||||
fd = open(config_path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
if (IN_SET(errno, ENOENT, ENOTDIR, EACCES))
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user