summaryrefslogtreecommitdiff
path: root/mk/pkginstall/files
diff options
context:
space:
mode:
authorwiz <wiz>2012-04-17 11:55:33 +0000
committerwiz <wiz>2012-04-17 11:55:33 +0000
commit8b7643c0567288bec93a141a34758f958118baa6 (patch)
tree91e10d0a521c6b804e6323e9a3b8924b1acb33af /mk/pkginstall/files
parent81124351d2148b103903fa073820cdfd22aecd57 (diff)
downloadpkgsrc-8b7643c0567288bec93a141a34758f958118baa6.tar.gz
Check for existing symlinks before overwriting config files in
PKG_SYSCONFDIR. From Edgar Fuß <ef@math.uni-bonn.de> on tech-pkg.
Diffstat (limited to 'mk/pkginstall/files')
-rw-r--r--mk/pkginstall/files4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/pkginstall/files b/mk/pkginstall/files
index 0b13f497324..66db1885682 100644
--- a/mk/pkginstall/files
+++ b/mk/pkginstall/files
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.6 2008/09/25 14:01:46 wiz Exp $
+# $NetBSD: files,v 1.7 2012/04/17 11:55:33 wiz Exp $
#
# Generate a +FILES script that reference counts config files that are
# required for the proper functioning of the package.
@@ -159,6 +159,8 @@ ADD)
*f*:*:*|[!r]:yes:*|[!r][!r]:yes:*|[!r][!r][!r]:yes:*|*r*:yes:yes)
if ${TEST} -f "$file"; then
${ECHO} "${PKGNAME}: $file already exists"
+ elif ${TEST} -h "$file"; then
+ ${ECHO} "${PKGNAME}: $file is a symlink"
elif ${TEST} -f "$f_eg" -o -c "$f_eg"; then
${ECHO} "${PKGNAME}: copying $f_eg to $file"
${CP} $f_eg $file