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:
Doug Barton 2005-04-24 01:51:22 +00:00
parent be6c0196e0
commit 65db76c1aa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145469

View file

@ -52,7 +52,7 @@ chroot_autoupdate()
fi fi
else else
# Make sure it points to the right place. # 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 fi