wanpipe/deb_control/prerm

49 lines
974 B
Plaintext
Raw Permalink Normal View History

2021-12-29 16:56:27 +00:00
#!/bin/sh
set -e
2021-12-29 17:44:13 +00:00
# prerm for Wanpipe
2021-12-29 16:56:27 +00:00
echo "Uninstalling WANPIPE..."
# ----------------------------------------------------------------------------
# Remove initialization scripts.
# ----------------------------------------------------------------------------
remove_init()
{
2021-12-29 17:44:13 +00:00
# Examine system bootstrap files.
if [ -d /etc/rc0.d ]; then
RC_DIR=/etc
elif [ -d /etc/rc.d/rc0.d ]; then
RC_DIR=/etc/rc.d
else
return 0
fi
2021-12-29 16:56:27 +00:00
PROD=wanrouter
2021-12-29 17:44:13 +00:00
PROD_INIT=$RC_DIR/init.d/$PROD
2021-12-29 16:56:27 +00:00
echo "Removing WANPIPE start-up scripts: $RC_DIR"
2021-12-29 17:44:13 +00:00
update-rc.d -f wanrouter remove
rm -f $PROD_INIT
2021-12-29 16:56:27 +00:00
2021-12-29 17:44:13 +00:00
return 0
2021-12-29 16:56:27 +00:00
}
2021-12-29 17:44:13 +00:00
case "$1" in
remove|deconfigure)
# remove start-on-boot scripts
remove_init;
;;
upgrade)
echo "Nothing to Remove, wanpipe install script understand this"
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 0
;;
esac
2021-12-29 16:56:27 +00:00
exit 0