diff --git a/app-shells/rc/rc-1.7.4.ebuild b/app-shells/rc/rc-1.7.4.ebuild index 551f043253b4a..22f4fd6d06998 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 }