diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2007-06-28 23:25:16 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2007-06-28 23:25:16 +0000 |
commit | abe6aac47f38c0a7e53c8bdbfcf00e7780ab0237 (patch) | |
tree | 7a01bbeae92a9cb27ae2876b20e84a76aa2203ae | |
parent | - Update to 1.9.4 (diff) |
Add rbash.
PR: 104040
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>
Notes
Notes:
svn path=/head/; revision=194421
-rw-r--r-- | shells/bash/Makefile | 3 | ||||
-rw-r--r-- | shells/bash/pkg-deinstall | 11 | ||||
-rw-r--r-- | shells/bash/pkg-install | 8 | ||||
-rw-r--r-- | shells/bash/pkg-plist | 1 |
4 files changed, 22 insertions, 1 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile index 2ff333b4087d..21377a9fae8c 100644 --- a/shells/bash/Makefile +++ b/shells/bash/Makefile @@ -9,7 +9,7 @@ PORTNAME= bash PATCHLEVEL= 17 PORTVERSION= 3.2.${PATCHLEVEL:S/^0//g} -PORTREVISION= 1 +PORTREVISION?= 2 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU:S/$/:bash/} \ ftp://ftp.cwru.edu/pub/%SUBDIR%/:faq @@ -111,6 +111,7 @@ pre-install: ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: + @cd ${PREFIX}/bin ; ${LN} -sf bash rbash .if !defined(NOPORTDOCS) @${MKDIR} ${DESTDIR}${DOCSDIR} .if !defined(WITH_INCLUDED_FAQ) diff --git a/shells/bash/pkg-deinstall b/shells/bash/pkg-deinstall index c8cee462b8c1..6f49f2c3ca3b 100644 --- a/shells/bash/pkg-deinstall +++ b/shells/bash/pkg-deinstall @@ -4,6 +4,7 @@ # BASH="${PKG_PREFIX-/usr/local}/bin/bash" +RBASH="${PKG_PREFIX-/usr/local}/bin/rbash" SHELLS="${PKG_DESTDIR-}/etc/shells" case $2 in @@ -18,5 +19,15 @@ DEINSTALL) echo "Not root, please remove $BASH from $SHELLS manually" fi fi + if grep -qs "^$RBASH\$" "$SHELLS"; then + if [ `id -u` -eq 0 ]; then + TMPSHELLS=`mktemp -t shells` + grep -v "^$RBASH\$" "$SHELLS" > "$TMPSHELLS" + cat "$TMPSHELLS" > "$SHELLS" + rm "$TMPSHELLS" + else + echo "Not root, please remove $RBASH from $SHELLS manually" + fi + fi ;; esac diff --git a/shells/bash/pkg-install b/shells/bash/pkg-install index c84878485e07..c42db4871432 100644 --- a/shells/bash/pkg-install +++ b/shells/bash/pkg-install @@ -4,6 +4,7 @@ # BASH="${PKG_PREFIX-/usr/local}/bin/bash" +RBASH="${PKG_PREFIX-/usr/local}/bin/rbash" SHELLS="${PKG_DESTDIR-}/etc/shells" case $2 in @@ -15,5 +16,12 @@ POST-INSTALL) echo "Not root, please add $BASH to $SHELLS manually" fi fi + if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$RBASH\$" "$SHELLS"; then + if [ `id -u` -eq 0 ]; then + echo "$RBASH" >> "$SHELLS" + else + echo "Not root, please add $RBASH to $SHELLS manually" + fi + fi ;; esac diff --git a/shells/bash/pkg-plist b/shells/bash/pkg-plist index 43408bf1428f..e40f71d8d46f 100644 --- a/shells/bash/pkg-plist +++ b/shells/bash/pkg-plist @@ -1,5 +1,6 @@ @comment $FreeBSD$ bin/bash +bin/rbash bin/bashbug %%NLS%%share/locale/en@boldquot/LC_MESSAGES/bash.mo %%NLS%%share/locale/en@quot/LC_MESSAGES/bash.mo |