diff options
author | wiz <wiz@pkgsrc.org> | 2012-04-17 11:55:33 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2012-04-17 11:55:33 +0000 |
commit | dbb28b580205b7f3d8c003b373795a62afbd58f8 (patch) | |
tree | 91e10d0a521c6b804e6323e9a3b8924b1acb33af /mk | |
parent | 0e5f05baafd9c51d7d026e06bdba86c067a46ac9 (diff) | |
download | pkgsrc-dbb28b580205b7f3d8c003b373795a62afbd58f8.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')
-rw-r--r-- | mk/pkginstall/files | 4 |
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 |