home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / var / lib / dpkg / info / acpi-support.postinst < prev    next >
Encoding:
Text File  |  2006-08-23  |  1.5 KB  |  56 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.14; then
  27.         if [ -L /etc/rcS.d/S52vbesave ];then
  28.                 update-rc.d -f vbesave remove >/dev/null
  29.         fi
  30. fi
  31.  
  32. if dpkg --compare-versions "$2" lt 0.47; then
  33.     if [ -f /var/lib/acpi-support/powerstate ]; then
  34.     chmod 644 /var/lib/acpi-support/powerstate;
  35.     fi
  36.     if [ -f /var/lib/acpi-support/lidstate ]; then
  37.     chmod 644 /var/lib/acpi-support/lidstate;
  38.     fi
  39. fi
  40.  
  41. if [ -x "/etc/init.d/vbesave" ]; then
  42.         update-rc.d vbesave start 05 2 3 4 5 . >/dev/null
  43. fi
  44.  
  45. # Automatically added by dh_installinit
  46. if [ -x "/etc/init.d/acpi-support" ]; then
  47.     update-rc.d acpi-support start 99 2 3 4 5 . stop 20 1 . >/dev/null
  48.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  49.         invoke-rc.d acpi-support start || exit $?
  50.     else
  51.         /etc/init.d/acpi-support start || exit $?
  52.     fi
  53. fi
  54. # End automatically added section
  55.  
  56.