1
# $XConsortium: phase3.tcl /main/1 1996/09/21 14:17:37 kaleb $
6
# $XFree86: xc/programs/Xserver/hw/xfree86/XF86Setup/phase3.tcl,v 3.5 1998/04/05 16:15:51 robin Exp $
8
# Copyright 1996 by Joseph V. Moss <joe@XFree86.Org>
10
# See the file "LICENSE" for information regarding redistribution terms,
11
# and for a DISCLAIMER OF ALL WARRANTIES.
15
# Phase III - Commands run after switching back to text mode
16
# - responsible for starting second server
19
source $tcl_library/init.tcl
20
source $XF86Setup_library/texts/local_text.tcl
21
source $XF86Setup_library/setuplib.tcl
22
source $XF86Setup_library/carddata.tcl
23
source $XF86Setup_library/mondata.tcl
26
mesg $messages(phase3.1) info
28
writeXF86Config $Confname-2 -defaultmodes
30
set devid [lindex $DeviceIDs 0]
32
set server [set Device_${devid}(Server)]
34
set ServerPID [start_server $server $Confname-2 ServerOut-2 ]
36
if { $ServerPID == -1 } {
37
set msg $messages(phase3.2)
40
if { $ServerPID == 0 } {
41
set msg $messages(phase3.3)
44
if { $ServerPID < 1 } {
45
mesg "$msg$messages(phase3.4)" okey
47
set ServerPID [start_server $server $Confname-1 ServerOut-1Bis]
48
if { $ServerPID < 1 } {
49
mesg $messages(phase3.5) info
54
if { ![string length [set Device_${devid}(ClockChip)]] } {
55
set fd [open $TmpDir/ServerOut-2 r]
58
while {[gets $fd line] >= 0} {
59
if {[regexp {\(.*: clocks: (.*)$} $line dummy clocks]} {
60
set clocks [string trim [squash_white $clocks]]
61
foreach clock [split $clocks] {
62
lappend clockrates $clock
70
set clockcount [llength $clockrates]
71
if { $clockcount != 0 && 1.0*$zerocount/$clockcount < 0.25 } {
72
set Device_${devid}(Clocks) $clockrates