summaryrefslogtreecommitdiffstats
path: root/rescue.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-01-14 03:45:17 +0000
committerMike Fulbright <msf@redhat.com>2003-01-14 03:45:17 +0000
commit8e2b7654061fd70a1bbbdbc17b4599d51d93419f (patch)
tree7cd28cd87e3d790b6fee5a2224455a1442f33dd8 /rescue.py
parentb0bbf8f841f969371e8525c37cb54d16bc73fd5b (diff)
downloadanaconda-8e2b7654061fd70a1bbbdbc17b4599d51d93419f.tar.gz
anaconda-8e2b7654061fd70a1bbbdbc17b4599d51d93419f.tar.xz
anaconda-8e2b7654061fd70a1bbbdbc17b4599d51d93419f.zip
make man pages work in rescue mode, plus make /bin/bash available so scripts will run
Diffstat (limited to 'rescue.py')
-rw-r--r--rescue.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/rescue.py b/rescue.py
index 4bdce6a7a..504b42c58 100644
--- a/rescue.py
+++ b/rescue.py
@@ -126,7 +126,7 @@ def startNetworking(network):
def runRescue(instPath, mountroot, id):
- for file in [ "services", "protocols", "group" ]:
+ for file in [ "services", "protocols", "group", "joe", "man.config" ]:
os.symlink('/mnt/runtime/etc/' + file, '/etc/' + file)
# see if they would like networking enabled
@@ -276,24 +276,41 @@ def runRescue(instPath, mountroot, id):
# find groff data dir
try:
- glst = os.listdir["/mnt/sysimage/usr/share/groff"]
+ glst = os.listdir("/mnt/sysimage/usr/share/groff")
# find a directory which is a numeral, its where
# data files are
+ gversion = None
for gdir in glst:
try:
- gversion = float(gdir)
+ isone = 1
+ for idx in range(0, len(gdir)):
+ if string.find(string.digits + '.', gdir[idx]) == -1:
+ isone = 0
+ break
+ if isone:
+ gversion = gdir
+ break
+
except:
gversion = None
continue
+
except:
gversion = None
if gversion is not None:
gpath = "/mnt/sysimage/usr/share/groff/"+gversion
os.environ["GROFF_FONT_PATH"] = gpath + '/font'
- os.environ["GROFF_TMAC_PATH"] = gpath + '/tmac'
+ os.environ["GROFF_TMAC_PATH"] = "%s:/mnt/sysimage/usr/share/groff/site-tmac" % (gpath + '/tmac',)
+
+ # do we have bash?
+ try:
+ if os.access("/usr/bin/bash", os.R_OK):
+ os.symlink ("/usr/bin/bash", "/bin/bash")
+ except:
+ pass
except: