summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-09-18 23:02:33 +0000
committergrant <grant@pkgsrc.org>2003-09-18 23:02:33 +0000
commit431d7280692b03d84463eb8de9b2066c78f91c9e (patch)
tree9fca4da9cf2c1b8a040b170a1a2b86bd633ccb56 /mk
parent9448e8706010352325d25b1f36de1f59e8f2c8a3 (diff)
downloadpkgsrc-431d7280692b03d84463eb8de9b2066c78f91c9e.tar.gz
fix regex when updating /etc/shells so that eg. "/bin/tcsh" doesn't
mistakenly cause the removal of eg. "/usr/pkg/bin/tcsh". PKG_SHELL should be an absolute path, anyway.
Diffstat (limited to 'mk')
-rw-r--r--mk/install/deinstall4
-rw-r--r--mk/install/install4
2 files changed, 4 insertions, 4 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall
index eed6f0533bc..fc361cea7d9 100644
--- a/mk/install/deinstall
+++ b/mk/install/deinstall
@@ -1,6 +1,6 @@
# start of deinstall
#
-# $NetBSD: deinstall,v 1.22 2003/09/17 02:38:29 jlam Exp $
+# $NetBSD: deinstall,v 1.23 2003/09/18 23:02:33 grant Exp $
eval set -- ${PKG_USERS}
for userset; do
@@ -96,7 +96,7 @@ VIEW-DEINSTALL)
if [ -n "${PKG_SHELL}" -a "${PKG_REGISTER_SHELLS}" = "YES" ]; then
${ECHO} "===> Updating /etc/shells"
${CP} /etc/shells /etc/shells.pkgsrc."$$"
- (${GREP} -v ${PKG_SHELL} /etc/shells.pkgsrc."$$" || ${TRUE}) > /etc/shells
+ (${GREP} -v "^${PKG_SHELL}" /etc/shells.pkgsrc."$$" || ${TRUE}) > /etc/shells
${RM} /etc/shells.pkgsrc."$$"
fi
;;
diff --git a/mk/install/install b/mk/install/install
index be97abf0bbb..b6658e076c3 100644
--- a/mk/install/install
+++ b/mk/install/install
@@ -1,6 +1,6 @@
# start of install
#
-# $NetBSD: install,v 1.25 2003/09/17 02:38:30 jlam Exp $
+# $NetBSD: install,v 1.26 2003/09/18 23:02:33 grant Exp $
if [ -z "${CONF_FILES}" -a -z "${CONF_FILES_PERMS}" -a \
-z "${SUPPORT_FILES}" -a -z "${SUPPORT_FILES_PERMS}" -o \
@@ -397,7 +397,7 @@ VIEW-INSTALL)
${ECHO} "===> Updating /etc/shells"
${TOUCH} /etc/shells
${CP} /etc/shells /etc/shells.pkgsrc."$$"
- (${GREP} -v ${PKG_SHELL} /etc/shells.pkgsrc."$$" || ${TRUE}; ${ECHO} ${PKG_SHELL}) > /etc/shells
+ (${GREP} -v "^${PKG_SHELL}" /etc/shells.pkgsrc."$$" || ${TRUE}; ${ECHO} ${PKG_SHELL}) > /etc/shells
${RM} /etc/shells.pkgsrc."$$"
fi
if [ "${_PKG_CONFIG}" = "YES" -a -n "${PKG_SYSCONFDEPOTBASE}" ]; then