Add -h to the ln command to make the -f flag actually do something.

Without this flag, if the symlink existed already a new symlink would
be created in the source directory. While harmless if the two symlinks
were the same, it nonetheless caused pointless confusion.

The pathological case is that when there is an existing /etc/namedb
symlink, but named_chrootdir in rc.conf pointed to a different
directory, it was the symlink in /var/named that was getting
updated, not the one in /etc. This led to some difficult to diagnose
problems for users.
This commit is contained in:
dougb 2005-04-24 01:51:22 +00:00
parent 6149b9f287
commit 37f3e68064

View File

@ -52,7 +52,7 @@ chroot_autoupdate()
fi
else
# Make sure it points to the right place.
ln -sf ${named_chrootdir}/etc/namedb /etc/namedb
ln -shf ${named_chrootdir}/etc/namedb /etc/namedb
fi