#!/bin/sh
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
#  -George

PATH=/usr/bin:$PATH

if [ -x /etc/X11/xinit/fixkeyboard ]; then
    /etc/X11/xinit/fixkeyboard
fi
  
if [ -x /etc/X11/xinit.d/numlock ]; then
    /etc/X11/xinit.d/numlock &
fi

xrdb -nocpp -merge /etc/X11/xdm/Xresources

for i in /etc/X11/xsetup.d/*.xsetup ; do
    [ -d $i ] && continue
  
    if [ -x $i ]; then
        if grep -q "# to be sourced" $i; then
            . $i
        else
            $i &
        fi
      fi
done

exit 0
