summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rwxr-xr-xanaconda5
-rw-r--r--iutil.py6
-rw-r--r--rescue.py6
4 files changed, 11 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index ed7831363..266329c68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,8 +16,10 @@
changes when going back to the parttype screen (#211255).
* textw/partition_text.py (PartitionWindow.__call__): Likewise.
- * anaconda (runVNC): Don't specify a stdout or stderr for shells on
+ * iutil.py (execConsole): Don't specify a stdout or stderr for shells on
s390 (#210481).
+
+ * anaconda (runVNC): Use execConsole.
* rescue.py (runShell): Likewise.
* text.py (spawShell): Likewise.
diff --git a/anaconda b/anaconda
index 6dc22b0bf..8f921816e 100755
--- a/anaconda
+++ b/anaconda
@@ -426,10 +426,7 @@ def runVNC(vncpassword, vncconnecthost, vncconnectport, vncStartedCB=None):
if os.access(p, os.R_OK|os.X_OK):
os.environ['PYTHONSTARTUP'] = p
break
- if rhpl.getArch() == "s390":
- iutil.execWithRedirect("/bin/sh", [])
- else:
- iutil.execWithRedirect("/bin/sh", [], stdout="/dev/console", stderr="/dev/console")
+ iutil.execConsole()
else:
addpid(shpid)
os.waitpid(shpid, 0)
diff --git a/iutil.py b/iutil.py
index a7554fe86..41518744a 100644
--- a/iutil.py
+++ b/iutil.py
@@ -74,6 +74,12 @@ def execWithCapture(command, argv, stdin = 0, stderr = 2, root='/'):
pipe.wait()
return rc
+def execConsole():
+ if rhpl.getArch() == "s390":
+ iutil.execWithRedirect("/bin/sh", [])
+ else:
+ iutil.execWithRedirect("/bin/sh", [], stdout="/dev/console", stderr="/dev/console")
+
# return size of directory (and subdirs) in kilobytes
def getDirSize(dir):
def getSubdirSize(dir):
diff --git a/rescue.py b/rescue.py
index cd9c54302..c39784192 100644
--- a/rescue.py
+++ b/rescue.py
@@ -28,7 +28,6 @@ import shutil
import fcntl
import termios
-import rhpl
from rhpl.translate import _
import logging
@@ -178,10 +177,7 @@ def runShell(screen = None, msg=""):
print
if os.path.exists("/bin/sh"):
- if rhpl.getArch() == "s390":
- iutil.execWithRedirect("/bin/sh", [])
- else:
- iutil.execWithRedirect("/bin/sh", [], stdout="/dev/console", stderr="/dev/console")
+ iutil.execConsole()
else:
print "Unable to find /bin/sh to execute! Not starting shell"
time.sleep(5)