summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells/rc')
-rw-r--r--app-shells/rc/rc-1.7.4.ebuild9
1 files changed, 5 insertions, 4 deletions
diff --git a/app-shells/rc/rc-1.7.4.ebuild b/app-shells/rc/rc-1.7.4.ebuild
index 551f043253b4..22f4fd6d0699 100644
--- a/app-shells/rc/rc-1.7.4.ebuild
+++ b/app-shells/rc/rc-1.7.4.ebuild
@@ -35,8 +35,9 @@ src_install() {
}
pkg_postinst() {
- ebegin "Updating /etc/shells"
- ( grep -v "^/bin/rcsh$" "${ROOT}"etc/shells; echo "/bin/rcsh" ) > "${T}"/shells
- mv -f "${T}"/shells "${ROOT}"etc/shells
- eend $?
+ if ! grep -q '^/bin/rcsh$' "${EROOT}"/etc/shells ; then
+ ebegin "Updating /etc/shells"
+ echo "/bin/rcsh" >> "${EROOT}"/etc/shells
+ eend $?
+ fi
}