#!/bin/sh post_install() { for i in 'dash' 'ash'; do grep -qx "/bin/${i}" 'etc/shells' || echo "/bin/${i}" >> 'etc/shells' done unset i } post_upgrade() { post_install } post_remove() { for i in 'dash' 'ash'; do sed -i "\|^/bin/${i}$|d" 'etc/shells' done unset i }