## cLIeNUX MCA startX
      
#       20000323   Rick Hohensee, primary author   humbubba@smart.net
#	commissioned by Charles Lasitter, North Carolina Direct Marketing

# Initial version will be cLIeNUX and MCA specific.

KEYBOARD=/.et/X/MCA/Keyboard				
POINTER=/.et/X/MCA/Pointer

startserver () {		# a subroutine for starting the server 
echo -e "starting $SERVER"
$SERVER -XF86Config /.tm/Xconfigncdm
}

SERVER=dummy_servername


buildconfig () {
rm /.tm/Xconfigncdm
echo -n "# " 		> /.tm/Xconfigncdm
cat $FILES 		>> /.tm/Xconfigncdm
cat $MODULE 		>> /.tm/Xconfigncdm
cat $SERVERFLAGS 	>> /.tm/Xconfigncdm
cat $KEYBOARD 		>> /.tm/Xconfigncdm
cat $POINTER 		>> /.tm/Xconfigncdm
cat $MONITORFILE 	>> /.tm/Xconfigncdm

}


## MAIN MAIN MAIN main()   invocation flow starts here
if test -f /.tm/Xconfigncdm
then
	## existing temp config found.
	startserver
	
else 

clear 
fmt <<HERE 

No existing cLIeNUX X config found in /temp/Xconfigncdm. If you haven't
run cLIeNUX startX (this script) before that's normal. If you have then
you may have a backup of a previous configuration in
/suite/X/configure/backup. If you want to use that, copy it to
/temp/Xconfigncdm and restart this script. Otherwise, hit <enter> and
we'll create one.

HERE

read JUNK

clear

fmt <<HERE

We will now try to make you an MCA X config file. The more info you know
about your video setup, the better we'll do.




hit enter when ready


HERE
read JUNK
clear

echo "
What slot is your video adapter card in? 
Enter one of the following (numeral or p and <enter>)...
	1	
	2
	3
	4	
	5 
	6
	7
	p	planar


"

read SLOT

clear
echo "
Enter your monitor type...
	
	9515
	9517
	9518
	8512
 	8513
 	8514
 	8515

"
read MONITOR
if test -e /.et/X/MCA/Monitor/$MONITOR
then 
	echo $MONITOR "data file found"
else
echo "
That string you gave as a monitor type isn't in the cLIeNUX startX
data files. I'll assume some things, but this greatly reduces the
chance of X working.
"



fi

enter JUNK

clear
echo "


Pick your video adapter, input the string in the ENTRY column ...

    ENTRY
    pvga	- Planar   VGA (most  85xx computers)
    pxga	- Planar   XGA (8590, 9590)
    psvga	- Planar  SVGA (9577, S3 chipset)
    xga		- Adapter  XGA (8595, 9595)
    xga2	- Adapter XGA2 (8595, 9595)
    svga	- Adapter SVGA (9595, 9585 Server)
    8514	- Adapter 8514 ( AVE, various)




"

read ADAPTER



fi

