diff options
author | Mike Fulbright <msf@redhat.com> | 1999-12-06 21:24:57 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 1999-12-06 21:24:57 +0000 |
commit | 0d04e6b56c99dd4ea0145c1799863efc94fbbc73 (patch) | |
tree | 7971ef334d06a2f1cb88bb1540da61a26434f41e /xserver.py | |
parent | b6ae83ecc9c73cb5037ea3a10b7827ea947a6031 (diff) | |
download | anaconda-0d04e6b56c99dd4ea0145c1799863efc94fbbc73.tar.gz anaconda-0d04e6b56c99dd4ea0145c1799863efc94fbbc73.tar.xz anaconda-0d04e6b56c99dd4ea0145c1799863efc94fbbc73.zip |
- Added support to use existing XF86Config file in reconfig mode
- Reconfig mode following inittab default runlevel display mode (text for 3,
GUI for 5)
- made dhcp the default in GUI mode as well as text mode
Diffstat (limited to 'xserver.py')
-rw-r--r-- | xserver.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/xserver.py b/xserver.py index edf7fe795..c8f602fd7 100644 --- a/xserver.py +++ b/xserver.py @@ -212,3 +212,33 @@ EndSection sys.exit((status >> 8) & 0xf) return ((mouseProtocol, mouseEmulate, mouseDev), x) + + + +# +# to start X server using existing XF86Config file (reconfig mode use only) +# +def start_existing_X(): + + os.environ['DISPLAY'] = ':1' + + server = os.fork() + serverPath = "/etc/X11/X" + if (not server): + print "Starting X using existing XF86Config" + args = [serverPath, ':1', 'vt7', '-s', '1440', '-terminate'] + os.execv(serverPath, args) + + # give time for the server to fail (if it is going to fail...) + # FIXME: Should find out if X server is already running + # otherwise with NFS installs the X server may be still being + # fetched from the network while we already continue to run + time.sleep (4) + pid, status = os.waitpid (server, os.WNOHANG) + if status: + raise RuntimeError, "X server failed to start" + + # startX() function above does a double-fork here, do we need to in + # reconfig mode? + + return (None, None) |