pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install fix regex when updating /etc/shells so that...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/10993612b998
branches:  trunk
changeset: 461658:10993612b998
user:      grant <grant%pkgsrc.org@localhost>
date:      Thu Sep 18 23:02:33 2003 +0000

description:
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:

 mk/install/deinstall |  4 ++--
 mk/install/install   |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r f8b8f4219ca9 -r 10993612b998 mk/install/deinstall
--- a/mk/install/deinstall      Thu Sep 18 22:59:38 2003 +0000
+++ b/mk/install/deinstall      Thu Sep 18 23:02:33 2003 +0000
@@ -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 @@
        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 -r f8b8f4219ca9 -r 10993612b998 mk/install/install
--- a/mk/install/install        Thu Sep 18 22:59:38 2003 +0000
+++ b/mk/install/install        Thu Sep 18 23:02:33 2003 +0000
@@ -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 @@
                ${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



Home | Main Index | Thread Index | Old Index