summaryrefslogtreecommitdiffstats
path: root/shells
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2007-06-28 23:25:16 +0000
committerobrien <obrien@FreeBSD.org>2007-06-28 23:25:16 +0000
commit75376d33c6a059ecbf91d5b84c93899ab17c8b20 (patch)
tree3bfe124d663771703dcbbca80877408e3ff0824d /shells
parentdef66d1459915e7b912e960f6e64121caf727d33 (diff)
downloadFreeBSD-ports-75376d33c6a059ecbf91d5b84c93899ab17c8b20.zip
FreeBSD-ports-75376d33c6a059ecbf91d5b84c93899ab17c8b20.tar.gz
Add rbash.
PR: 104040 Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>
Diffstat (limited to 'shells')
-rw-r--r--shells/bash/Makefile3
-rw-r--r--shells/bash/pkg-deinstall11
-rw-r--r--shells/bash/pkg-install8
-rw-r--r--shells/bash/pkg-plist1
4 files changed, 22 insertions, 1 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile
index 2ff333b..21377a9 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 c8cee46..6f49f2c 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 c848784..c42db48 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 43408bf..e40f71d 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
OpenPOWER on IntegriCloud