home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / wpasupplicant.postinst < prev    next >
Encoding:
Text File  |  2007-04-01  |  1.3 KB  |  64 lines

  1. #!/bin/sh -e
  2. # This script can be called in the following ways:
  3. #
  4. # After the package was installed:
  5. #       <postinst> configure <old-version>
  6. #
  7. #
  8. # If prerm fails during upgrade or fails on failed upgrade:
  9. #       <old-postinst> abort-upgrade <new-version>
  10. #
  11. # If prerm fails during deconfiguration of a package:
  12. #       <postinst> abort-deconfigure in-favour <new-package> <version>
  13. #                  removing <old-package> <version>
  14. #
  15. # If prerm fails during replacement due to conflict:
  16. #       <postinst> abort-remove in-favour <new-package> <version>
  17.  
  18.  
  19. # Remove a no-longer used conffile
  20. rm_conffile()
  21. {
  22.     CONFFILE="$1"
  23.  
  24.     if [ -e "$CONFFILE" ]; then
  25.     echo "Removing obsolete conffile $CONFFILE"
  26.     rm -f "$CONFFILE"
  27.     fi
  28. }
  29.  
  30.  
  31. # Remove init script
  32. rm_init_script()
  33. {
  34.     rm_conffile /etc/default/wpasupplicant
  35.     rm_conffile /etc/init.d/wpasupplicant
  36.     rm_conffile /etc/wpa_supplicant.conf
  37.     update-rc.d -f wpasupplicant remove
  38. }
  39.  
  40.  
  41. case "$1" in
  42.     configure)
  43.     if dpkg --compare-versions "$2" lt "0.4.8-1"; then
  44.         rm_init_script
  45.     fi
  46.     ;;
  47.  
  48.     abort-upgrade|abort-deconfigure|abort-remove)
  49.     ;;
  50.  
  51.     *)
  52.     echo "$0 called with unknown argument \`$1'" 1>&2
  53.     exit 1
  54.     ;;
  55. esac
  56.  
  57. # Automatically added by dh_installinit
  58. if [ -x "/etc/init.d/wpa-ifupdown" ]; then
  59.     update-rc.d wpa-ifupdown start 15 0 6 . >/dev/null || exit $?
  60. fi
  61. # End automatically added section
  62.  
  63. exit 0
  64.