home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh -e
- # This script can be called in the following ways:
- #
- # After the package was installed:
- # <postinst> configure <old-version>
- #
- #
- # If prerm fails during upgrade or fails on failed upgrade:
- # <old-postinst> abort-upgrade <new-version>
- #
- # If prerm fails during deconfiguration of a package:
- # <postinst> abort-deconfigure in-favour <new-package> <version>
- # removing <old-package> <version>
- #
- # If prerm fails during replacement due to conflict:
- # <postinst> abort-remove in-favour <new-package> <version>
-
-
- # Remove a no-longer used conffile
- rm_conffile()
- {
- CONFFILE="$1"
-
- if [ -e "$CONFFILE" ]; then
- echo "Removing obsolete conffile $CONFFILE"
- rm -f "$CONFFILE"
- fi
- }
-
-
- # Remove init script
- rm_init_script()
- {
- rm_conffile /etc/default/wpasupplicant
- rm_conffile /etc/init.d/wpasupplicant
- rm_conffile /etc/wpa_supplicant.conf
- update-rc.d -f wpasupplicant remove
- }
-
-
- case "$1" in
- configure)
- if dpkg --compare-versions "$2" lt "0.4.8-1"; then
- rm_init_script
- fi
- ;;
-
- abort-upgrade|abort-deconfigure|abort-remove)
- ;;
-
- *)
- echo "$0 called with unknown argument \`$1'" 1>&2
- exit 1
- ;;
- esac
-
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/wpa-ifupdown" ]; then
- update-rc.d wpa-ifupdown start 15 0 6 . >/dev/null || exit $?
- fi
- # End automatically added section
-
- exit 0
-