Sophie

Sophie

distrib > Mandriva > 7.1 > i586 > by-pkgid > dc694468d7cb14a5ee5f9e4a125eff3d > scriptlet

ash-0.2-21mdk.i586.rpm

POSTIN

/bin/sh
if [ ! -f /etc/shells ]; then
	echo "/bin/ash" > /etc/shells
	echo "/bin/bsh" >> /etc/shells
else
	if ! grep '^/bin/ash$' /etc/shells > /dev/null; then
		echo "/bin/ash" >> /etc/shells
	fi
	if ! grep '^/bin/bsh$' /etc/shells > /dev/null; then
		echo "/bin/bsh" >> /etc/shells
	fi
fi

POSTUN

/bin/sh

if [ "$1" = 0 ]; then
	grep -v '^/bin/ash' < /etc/shells | grep -v '^/bin/bsh' > /etc/shells.new
	mv /etc/shells.new /etc/shells
fi