#! /bin/sh

# source debconf library
. /usr/share/debconf/confmodule

# if gconf path file is present and doesn't include the generated path file
# then ask the user wether to activate gnome profiles (defaults to no)
if (test -e /etc/gconf/2/path) ; then
  if ! ( (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/2/path > /dev/null) ||
         (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/2/path > /dev/null) ); then
    db_input medium desktop-profiles/replace-gconf-system-wide-path-file || true;
    db_go || true;
  fi;
elif (test -e /etc/gconf/2/path) ; then
  if ! ( (grep '/var/cache/desktop-profiles/\$(USER)_mandatory.path' /etc/gconf/1/path > /dev/null) ||
         (grep '/var/cache/desktop-profiles/\$(USER)_defaults.path'  /etc/gconf/1/path > /dev/null) ); then
    db_input medium desktop-profiles/replace-gconf-system-wide-path-file || true;
    db_go || true;
  fi;
fi;  

#DEBHELPER#
