#!/bin/sh

XCONF=/usr/bin/xconf
if [ -z "$1" ];then 
XORGCONF=/etc/X11/xorg.conf
else
 XORGCONF=$1
fi
DRVD=/usr/X11R6/lib/drv.d
[ -x "$XCONF" ] || exit 1
[ -e "$XORGCONF" ] || exit 1
DRV=`$XCONF -g $XORGCONF`
[ -n "$DRV" ] || exit 1
if [ -x "$DRVD/$DRV" ];then
	$DRVD/$DRV
else
	$DRVD/x11
fi
