1 2 3 4 5 6 7 8 9 10 11 12 13
post_install() { echo "Adding '/usr/bin/oksh' to '/etc/shells'..." grep -qe '^/usr/bin/oksh$' etc/shells || echo '/usr/bin/oksh' >> etc/shells } post_upgrade() { post_install } pre_remove() { echo "Removing '/usr/bin/oksh' from '/etc/shells'..." sed -i '\|^/usr/bin/oksh$|d' etc/shells }