summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-12-15 22:17:26 +0000
committerChris Lumens <clumens@redhat.com>2006-12-15 22:17:26 +0000
commitc8ba25b13b37bf9d3ecef2fda6005fbc5cd4620e (patch)
tree4b789605c32b646bc1a79595bdbbd8cec2ea8344 /iutil.py
parent2c42fba972fb36bbb744924cfdb42265f3de42b9 (diff)
downloadanaconda-c8ba25b13b37bf9d3ecef2fda6005fbc5cd4620e.tar.gz
anaconda-c8ba25b13b37bf9d3ecef2fda6005fbc5cd4620e.tar.xz
anaconda-c8ba25b13b37bf9d3ecef2fda6005fbc5cd4620e.zip
Don't use all the complication of execWithRedirect so shells end up where
they're supposed to be (#210481, #216155).
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/iutil.py b/iutil.py
index 60e265a6a..d2bf0e736 100644
--- a/iutil.py
+++ b/iutil.py
@@ -75,10 +75,11 @@ def execWithCapture(command, argv, stdin = 0, stderr = 2, root='/'):
return rc
def execConsole():
- if rhpl.getArch() == "s390":
- execWithRedirect("/bin/sh", [])
- else:
- execWithRedirect("/bin/sh", [], stdout="/dev/console", stderr="/dev/console")
+ try:
+ proc = subprocess.Popen(["/bin/sh"])
+ proc.wait()
+ except OSError, (errno, msg):
+ raise RuntimeError, "Error running /bin/sh: " + msg
# return size of directory (and subdirs) in kilobytes
def getDirSize(dir):