summaryrefslogtreecommitdiffstats
path: root/rescue.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-04-04 21:03:53 +0000
committerMike Fulbright <msf@redhat.com>2001-04-04 21:03:53 +0000
commit17ca67e561a29698f7351a3027e2674bd70e0f4d (patch)
tree06f7d04302d2e00ecbe8ad4940bd2f13bef7d0aa /rescue.py
parent63ebeff438ea90e8dbc9cdf30f70948179f23874 (diff)
downloadanaconda-17ca67e561a29698f7351a3027e2674bd70e0f4d.tar.gz
anaconda-17ca67e561a29698f7351a3027e2674bd70e0f4d.tar.xz
anaconda-17ca67e561a29698f7351a3027e2674bd70e0f4d.zip
allow use of 'nomount' commandline option to prevent rescue mode from trying to mount root directory.
Diffstat (limited to 'rescue.py')
-rw-r--r--rescue.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/rescue.py b/rescue.py
index 6697f5a43..7758125c7 100644
--- a/rescue.py
+++ b/rescue.py
@@ -24,7 +24,7 @@ class RescueInterface:
def __init__(self, screen):
self.screen = screen
-def runRescue(url, serial):
+def runRescue(url, serial, mountroot):
from fstab import NewtFstab
@@ -32,6 +32,12 @@ def runRescue(url, serial):
log.open (serial, 0, 0, 1)
+ for file in [ "services", "protocols", "group" ]:
+ os.symlink('/mnt/runtime/etc/' + file, '/etc/' + file)
+
+ if (not mountroot):
+ os.execv("/bin/sh", [ "-/bin/sh" ])
+
try:
fstab = NewtFstab(1, serial, 0, 0, None, None, None, 0, [], 0, 0,
requireBlockDevices = 0)
@@ -133,9 +139,6 @@ def runRescue(url, serial):
screen.finish()
- for file in [ "services", "protocols", "group" ]:
- os.symlink('/mnt/runtime/etc/' + file, '/etc/' + file)
-
if rootmounted:
print
print _("Your system is mounted under the /mnt/sysimage directory.")