home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / acpi-support.postinst < prev    next >
Encoding:
Text File  |  2009-03-27  |  1.2 KB  |  46 lines

  1. #!/bin/bash
  2.  
  3. case "$1" in
  4.         configure)
  5.                 invoke-rc.d acpid restart>/dev/null
  6.                 ;;
  7.         *)
  8.                 ;;
  9. esac
  10.  
  11. #fix up old packages.
  12. if [ -L /etc/rc2.d/S20acpi-support ]; then
  13. # we're probably using defaults, so let's blow us away.
  14.         update-rc.d -f acpi-support remove
  15. fi
  16.  
  17. if [ ! -L /etc/rc1.d/K20acpi-support -a -L /etc/rc2.d/S99acpi-support ]; then
  18.         update-rc.d -f acpi-support remove
  19. fi
  20.  
  21. # Remove shutdown and reboot links; this init script does not need them.
  22. if dpkg --compare-versions "$2" lt "0.86"; then
  23.     rm -f /etc/rc0.d/K20acpi-support /etc/rc6.d/K20acpi-support
  24. fi
  25.  
  26. if dpkg --compare-versions "$2" lt 0.47; then
  27.     if [ -f /var/lib/acpi-support/powerstate ]; then
  28.     chmod 644 /var/lib/acpi-support/powerstate;
  29.     fi
  30.     if [ -f /var/lib/acpi-support/lidstate ]; then
  31.     chmod 644 /var/lib/acpi-support/lidstate;
  32.     fi
  33. fi
  34.  
  35. # Automatically added by dh_installinit
  36. if [ -x "/etc/init.d/acpi-support" ]; then
  37.     update-rc.d acpi-support start 99 2 3 4 5 . stop 20 1 . >/dev/null
  38.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  39.         invoke-rc.d acpi-support start || exit $?
  40.     else
  41.         /etc/init.d/acpi-support start || exit $?
  42.     fi
  43. fi
  44. # End automatically added section
  45.  
  46.