post_install()
{
        if ! grep -q /usr/bin/ion /etc/shells ; then
                echo /usr/bin/ion >> /etc/shells
        else
                grep -v ion /etc/shells > /tmp/ion$$ &&
                echo /usr/bin/ion >> /tmp/ion$$ &&
                mv /tmp/ion$$ /etc/shells
        fi
}

post_remove()
{
        grep -v ion /etc/shells > /tmp/ion$$ &&
        mv /tmp/ion$$ /etc/shells
}

op=$1
shift

$op $*

