diff options
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/deinstall | 8 | ||||
-rw-r--r-- | mk/install/header | 5 | ||||
-rw-r--r-- | mk/install/install | 9 |
3 files changed, 19 insertions, 3 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall index debc3c768ab..854283fa15f 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -1,6 +1,6 @@ # start of deinstall # -# $NetBSD: deinstall,v 1.14 2002/10/23 17:43:17 jlam Exp $ +# $NetBSD: deinstall,v 1.15 2002/11/17 08:58:50 salo Exp $ eval set -- ${PKG_USERS} for userset; do @@ -88,6 +88,12 @@ DEINSTALL) fi done fi + 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 + ${RM} /etc/shells.pkgsrc."$$" + fi ;; POST-DEINSTALL) diff --git a/mk/install/header b/mk/install/header index fd49226ed43..32a4f0074a4 100644 --- a/mk/install/header +++ b/mk/install/header @@ -2,7 +2,7 @@ # # start of header # -# $NetBSD: header,v 1.16 2002/10/08 11:32:34 jlam Exp $ +# $NetBSD: header,v 1.17 2002/11/17 08:58:50 salo Exp $ PKGNAME=$1 STAGE=$2 @@ -65,6 +65,9 @@ OWN_DIRS_PERMS="@OWN_DIRS_PERMS@" PKG_SYSCONFBASE="@PKG_SYSCONFBASE@" PKG_SYSCONFDIR="@PKG_SYSCONFDIR@" +PKG_REGISTER_SHELLS="@PKG_REGISTER_SHELLS@" +PKG_SHELL="@PKG_SHELL@" + ALL_USERS= ALL_GROUPS= ALL_FILES= diff --git a/mk/install/install b/mk/install/install index 554e6dd0fd8..a7f939dac7f 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,6 +1,6 @@ # start of install # -# $NetBSD: install,v 1.16 2002/10/23 17:43:17 jlam Exp $ +# $NetBSD: install,v 1.17 2002/11/17 08:58:51 salo Exp $ case ${STAGE} in PRE-INSTALL) @@ -318,6 +318,13 @@ EOF EOF fi fi + if [ -n "${PKG_SHELL}" -a "${PKG_REGISTER_SHELLS}" = "YES" ]; then + ${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 + ${RM} /etc/shells.pkgsrc."$$" + fi ;; *) |