post_install()
{
	if grep -q /bin/rc /etc/shells 2> /dev/null ; then
		echo -n "updating /etc/shells... "
		sed -i 's|/bin/rc|/usr/bin/rc|' /etc/shells
		echo "done."
	elif ! grep -q /bin/rc /etc/shells 2> /dev/null ; then
		echo -n "updating /etc/shells... "
		echo "/usr/bin/rc" >> /etc/shells
		echo "done."
	fi
}

post_upgrade()
{
	post_install $1
}

pre_remove()
{
	echo -n "updating /etc/shells... "
	sed -i '/\/usr\/bin\/rc/ d' /etc/shells
	echo done
}

op=$1
shift

$op $*

# vim: ft=sh
