Sophie

Sophie

distrib > Mandriva > 9.0 > x86_64 > media > main > by-pkgid > 3f46c41c13b43d3060027bca30ca726c > scriptlet

ash-0.3.8-1mdk.x86_64.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