#!/bin/sh

xconf="/etc/X11"
dm="wdm"

if [ -L $xconf/XF86Config -a -L $xconf/$dm/Xservers ]; then

	oldpwd=`pwd`

	if [ $xconf/XF86Config -ef $xconf/XF86Config.single ]; then 
		echo -n "Switching from single to dual..."
		ln -sf XF86Config.dual $xconf/XF86Config
		ln -sf Xservers.dual $xconf/$dm/Xservers
		echo "Done."
	else
		echo -n "Switching from dual to single..."
		ln -sf XF86Config.single $xconf/XF86Config
		ln -sf Xservers.single $xconf/$dm/Xservers
		echo "Done."
	fi

	cd $oldpwd

else

	echo "Something's wrong with XF86Config.  Give it a look."

fi

exit
	

