diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | anaconda | 5 | ||||
-rw-r--r-- | iutil.py | 6 | ||||
-rw-r--r-- | rescue.py | 6 |
4 files changed, 11 insertions, 10 deletions
@@ -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. @@ -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) @@ -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): @@ -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) |