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:
Rhys
2016-08-09 09:33:46 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent e73529f9dd
commit 1cd1dab98c
+1 -1
View File
@@ -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;