# arg 1: the new package version pre_install() { # # do pre-install stuff here # /bin/true } # arg 1: the new package version post_install() { # # do post-install stuff here # sed -n '/^DAEMONS/p' /etc/rc.conf | grep niceshaper >/dev/null if [ $? != 0 ]; then sed -i '/^DAEMONS/s/iptables/iptables !niceshaper/' /etc/rc.conf fi echo "Przed uruchomieniem przeczytaj: " echo "/etc/niceshaper/najpierw.README" echo "Zrób konfiguracje wg instrukcji a potem" echo "wpisz: " echo "/etc/rc.d/niceshaper start." echo "Po restarcie program powinien wystartować" echo "automatycznie." echo "" echo "Strona domowa projektu:" echo "http://www.niceshaper.jedwabny.net/" } # arg 1: the new package version # arg 2: the old package version pre_upgrade() { # # do pre-upgrade stuff here # /bin/true } # arg 1: the new package version # arg 2: the old package version post_upgrade() { # # do post-upgrade stuff here # /bin/true } # arg 1: the old package version pre_remove() { # # do pre-remove stuff here # /bin/true } # arg 1: the old package version post_remove() { # # do post-remove stuff here # sed -n '/^DAEMONS/p' /etc/rc.conf | grep niceshaper >/dev/null if [ $? = 0 ]; then sed -i '/^DAEMONS/s/ niceshaper/ !niceshaper/' /etc/rc.conf fi /bin/true } op=$1 shift $op $*