#!/bin/sh
# - This is where we set KDEDIRS, the variable that determines where KDE looks
#   for (amongs others) configuration files.
# - The menus should be choosen based on the users group.
################################################################################

# start with config common to all profiles, and default system-wide settings
export KDEDIRS=/usr/share/debian-edu/common:/usr

# add the extra config common to all profiles where the machine is inside a
# debian-edu network (i.e. all but standalone)
# if we're inside a debian-edu network (i.e. the installed profile isn't education-standalone)
if !(dpkg --get-selections education-standalone 2>&1 | grep " install$" > /dev/null); then
  # if we're still running kde2
  if (kde-config --version | grep "^KDE: 2" > /dev/null); then
    KDEDIRS=/usr/share/debian-edu/networked-kde2:$KDEDIRS;
  # if we're using kde3
  elif (kde-config --version | grep "^KDE: 3" > /dev/null); then
    KDEDIRS=/usr/share/debian-edu/networked-kde3:$KDEDIRS;
  fi;
fi;
