summaryrefslogtreecommitdiffstats
path: root/xf86config.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-06-25 22:18:23 +0000
committerJeremy Katz <katzj@redhat.com>2001-06-25 22:18:23 +0000
commiteafadd5ed339bd3bcc9c08dae5c8345c6d2ee79a (patch)
tree347e17ad1191953d1c6a26f40ff0ca197f7f1056 /xf86config.py
parentf4da3b5242f3e0942ce534a83ec02e1c68645a60 (diff)
downloadanaconda-eafadd5ed339bd3bcc9c08dae5c8345c6d2ee79a.tar.gz
anaconda-eafadd5ed339bd3bcc9c08dae5c8345c6d2ee79a.tar.xz
anaconda-eafadd5ed339bd3bcc9c08dae5c8345c6d2ee79a.zip
run the X test out of the installed environment
Diffstat (limited to 'xf86config.py')
-rw-r--r--xf86config.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/xf86config.py b/xf86config.py
index 04d9de3e9..13b525f7c 100644
--- a/xf86config.py
+++ b/xf86config.py
@@ -924,7 +924,7 @@ class XF86Config:
return modes
return None
- def test (self, serverflags=None, spawn=0):
+ def test (self, serverflags=None, spawn=0, root='/'):
servername = self.video.primaryCard().getXServer()
if not servername:
return
@@ -961,7 +961,7 @@ class XF86Config:
FontPath "/usr/share/fonts/KOI8-R/misc/"
FontPath "/usr/share/fonts/KOI8-R/75dpi/"
"""
- f = open ('/tmp/XF86Config.test', 'w')
+ f = open ('%s/tmp/XF86Config.test' %(root), 'w')
if servername == "XFree86":
config = self.Version4Config
@@ -978,8 +978,12 @@ class XF86Config:
serverPath = "/usr/X11R6/bin/" + servername
serverpid = os.fork()
-
+
if (not serverpid):
+ if (root and root != '/'):
+ isys.chroot (root)
+ os.chdir("/")
+
args = [serverPath, '-xf86config', '/tmp/XF86Config.test' ]
logFile = "/tmp/X.log"
if servername == "XFree86":
@@ -1010,6 +1014,10 @@ class XF86Config:
child = os.fork()
if (not child):
+ if (root and root != '/'):
+ isys.chroot (root)
+ os.chdir("/")
+
os.environ["DISPLAY"] = ":9"
os.execv("/usr/X11R6/bin/Xtest", ["Xtest", "--nostart", "--norunlevel"])
else: