diff options
Diffstat (limited to 'shells/bash/pkg-install')
-rw-r--r-- | shells/bash/pkg-install | 8 |
1 files changed, 8 insertions, 0 deletions
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 |