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 / gnome-power-manager.postinst < prev    next >
Encoding:
Text File  |  2007-04-13  |  2.3 KB  |  74 lines

  1. #! /bin/sh
  2. # postinst script for gnome-power-manager
  3.  
  4. set -e
  5.  
  6. # Automatically added by dh_scrollkeeper
  7. if [ "$1" = "configure" ] && which scrollkeeper-update >/dev/null 2>&1; then
  8.     scrollkeeper-update -q >/dev/null 2>&1
  9. fi
  10. # End automatically added section
  11. # Automatically added by dh_gconf
  12. if [ "$1" = "configure" ] && which update-gconf-defaults >/dev/null 2>&1; then
  13.     update-gconf-defaults
  14. fi
  15. # End automatically added section
  16. # Automatically added by dh_gconf
  17. if [ "$1" = "configure" ]; then
  18.     gconf-schemas --register gnome-power-manager.schemas 
  19. fi
  20. # End automatically added section
  21. # Automatically added by dh_desktop
  22. if [ "$1" = "configure" ] && which update-desktop-database >/dev/null 2>&1 ; then
  23.     update-desktop-database -q
  24. fi
  25. # End automatically added section
  26. # Automatically added by dh_iconcache
  27. touch -m /usr/share/icons/hicolor
  28. if [ "$1" = configure ] && \
  29.    [ -x "`which gtk-update-icon-cache 2>/dev/null`" ] && \
  30.    [ -f /etc/gtk-2.0/gdk-pixbuf.loaders ] && \
  31.    [ "`find /usr/share/icons/hicolor -mindepth 1 -maxdepth 1 -type d | wc -l`" -gt 0 ] && \
  32.    [ "`find /usr/share/icons/hicolor -mindepth 1 -maxdepth 1 -type f -name index.theme | wc -l`" -eq 1 ]; then
  33.     gtk-update-icon-cache -q /usr/share/icons/hicolor
  34. fi
  35. # End automatically added section
  36.  
  37.  
  38. case "$1" in
  39.     configure)
  40.         if [ -r /usr/share/acpi-support/device-funcs ]; then
  41.        . /usr/share/acpi-support/device-funcs
  42.            DeviceConfig
  43.         fi
  44.         if [ "x$ACPI_SLEEP" = "xtrue" ]; then
  45.             gconftool-2 --direct \
  46.                         --config-source xml:readwrite:/var/lib/gconf/defaults \
  47.                         --set --type bool \
  48.                         /apps/gnome-power-manager/can_suspend true
  49.  
  50.             gconftool-2 --direct \
  51.                         --config-source xml:readwrite:/var/lib/gconf/defaults \
  52.                         --set --type string \
  53.                         /apps/gnome-power-manager/action_button_suspend suspend
  54.  
  55.             gconftool-2 --direct \
  56.                         --config-source xml:readwrite:/var/lib/gconf/defaults \
  57.                         --set --type bool \
  58.                         /apps/gnome-power-manager/suppress_suspend_warning true
  59.  
  60.         fi
  61.     ;;
  62.  
  63.     abort-upgrade|abort-remove|abort-deconfigure)
  64.  
  65.     ;;
  66.  
  67.     *)
  68.         echo "postinst called with unknown argument \`$1'" >&2
  69.         exit 1
  70.     ;;
  71. esac
  72.  
  73. exit 0
  74.