forked from Lainports/freebsd-ports
Add rbash.
PR: 104040 Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>
This commit is contained in:
parent
b8b4bef634
commit
abe6aac47f
4 changed files with 22 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue