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-panel-data.postinst < prev    next >
Encoding:
Text File  |  2007-04-20  |  2.6 KB  |  78 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. self="$(basename "$0")"
  6.  
  7. action="$1"
  8.  
  9. # Automatically added by dh_installmenu
  10. inst=/etc/menu-methods/gnome-panel-data
  11. if [ -f $inst ]; then
  12.     chmod a+x $inst
  13.     if [ -x "`which update-menus 2>/dev/null`" ]; then
  14.         update-menus
  15.     fi
  16. fi
  17. # End automatically added section
  18. # Automatically added by dh_scrollkeeper
  19. if [ "$1" = "configure" ] && which scrollkeeper-update >/dev/null 2>&1; then
  20.     scrollkeeper-update -q >/dev/null 2>&1
  21. fi
  22. # End automatically added section
  23. # Automatically added by dh_gconf
  24. if [ "$1" = "configure" ]; then
  25.     gconf-schemas --register panel-compatibility.schemas panel-global.schemas panel-general.schemas panel-toplevel.schemas panel-object.schemas clock.schemas fish.schemas workspace-switcher.schemas window-list.schemas 
  26. fi
  27. # End automatically added section
  28. # Automatically added by dh_desktop
  29. if [ "$1" = "configure" ] && which update-desktop-database >/dev/null 2>&1 ; then
  30.     update-desktop-database -q
  31. fi
  32. # End automatically added section
  33. # Automatically added by dh_iconcache
  34. touch -m /usr/share/icons/hicolor
  35. if [ "$1" = configure ] && \
  36.    [ -x "`which gtk-update-icon-cache 2>/dev/null`" ] && \
  37.    [ -f /etc/gtk-2.0/gdk-pixbuf.loaders ] && \
  38.    [ "`find /usr/share/icons/hicolor -mindepth 1 -maxdepth 1 -type d | wc -l`" -gt 0 ] && \
  39.    [ "`find /usr/share/icons/hicolor -mindepth 1 -maxdepth 1 -type f -name index.theme | wc -l`" -eq 1 ]; then
  40.     gtk-update-icon-cache -q /usr/share/icons/hicolor
  41. fi
  42. # End automatically added section
  43.  
  44.  
  45. case "$action" in
  46.   configure)
  47.     version="$2"
  48.  
  49.     if [ -n "$version" ] \
  50.        && dpkg --compare-versions "$version" lt "2.16.2-0ubuntu1"; then
  51.         config_source=$(gconftool-2 --get-default-source)
  52.         tmp_dir=$(mktemp -t -d gconf.XXXXXXXXXX)
  53.         HOME="$tmp_dir" gconftool-2 --direct \
  54.                                     --config-source="$config_source" \
  55.                                     --recursive-unset \
  56.                                     /apps/panel/default_setup \
  57.                                     >/dev/null
  58.         kill -s HUP `pidof gconfd-2` >/dev/null 2>&1 || true
  59.         rm -rf "$tmp_dir"
  60.     fi
  61.  
  62.     if [ -x /usr/sbin/laptop-detect ] && /usr/sbin/laptop-detect; then
  63.         echo "laptop configuration"
  64.     cp /usr/share/gconf/schemas/panel-default-setup-laptop.entries /usr/share/gconf/defaults/05_panel-default-setup.entries
  65.     else
  66.         echo "desktop configuration"
  67.     cp /usr/share/gconf/schemas/panel-default-setup.entries /usr/share/gconf/defaults/05_panel-default-setup.entries
  68.     fi
  69.  
  70.     update-gconf-defaults
  71.   ;;
  72.   abort-upgrade|abort-remove|abort-remove|abort-deconfigure)
  73.   ;;
  74.   *)
  75.     echo "$self: W: unknown action \`$action'" >&2
  76.   ;;
  77. esac
  78.