mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
app-shells/rc: only update /etc/shells when needed
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user