post_install() {
    grep -qx /bin/ksh /etc/shells || echo /bin/ksh >>/etc/shells
    grep -qx /usr/bin/ksh /etc/shells || echo /usr/bin/ksh >>/etc/shells
}

post_upgrade() {
    post_install
}

post_remove() {
    sed -i -r '/^(\/usr)?\/bin\/ksh$/d' etc/shells
}
