From dbb28b580205b7f3d8c003b373795a62afbd58f8 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 17 Apr 2012 11:55:33 +0000 Subject: Check for existing symlinks before overwriting config files in PKG_SYSCONFDIR. From Edgar Fuß on tech-pkg. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mk/pkginstall/files | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mk/pkginstall') 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 -- cgit v1.2.3