summaryrefslogtreecommitdiffstats
path: root/livecd.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-09-17 15:46:51 +0000
committerJeremy Katz <katzj@redhat.com>2007-09-17 15:46:51 +0000
commit76122bd08c2e2b2e2780a32478c2318b99edbda0 (patch)
tree6f4f9f0cf5477275967ce3983694184b01d0751c /livecd.py
parent9ce13e063d437b8c0d3dda90fbfcd55990ee7329 (diff)
downloadanaconda-76122bd08c2e2b2e2780a32478c2318b99edbda0.tar.gz
anaconda-76122bd08c2e2b2e2780a32478c2318b99edbda0.tar.xz
anaconda-76122bd08c2e2b2e2780a32478c2318b99edbda0.zip
2007-09-17 Jeremy Katz <katzj@redhat.com>
* livecd.py (LiveCDImageMethod.unmountNonFstabDirs): Add method to do this unmounting and only do /selinux if SELinux is enabled (based on a patch from Douglas McClendon)
Diffstat (limited to 'livecd.py')
-rw-r--r--livecd.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/livecd.py b/livecd.py
index 75a1b9d25..afa69fcae 100644
--- a/livecd.py
+++ b/livecd.py
@@ -98,14 +98,19 @@ class LiveCDImageMethod(installmethod.InstallMethod):
custom_buttons=[_("Exit installer")])
sys.exit(0)
- def postAction(self, anaconda):
+ def unmountNonFstabDirs(self):
# unmount things that aren't listed in /etc/fstab. *sigh*
- for dir in ("/selinux", "/dev"):
+ dirs = ["/dev"]
+ if flags.selinux:
+ dirs.append("/selinux")
+ for dir in dirs
try:
isys.umount("%s/%s" %(anaconda.rootPath,dir), removeDir = 0)
except Exception, e:
log.error("unable to unmount %s: %s" %(dir, e))
+ def postAction(self, anaconda):
+ self.unmountNonFstabDirs()
try:
anaconda.id.fsset.umountFilesystems(anaconda.rootPath,
swapoff = False)
@@ -157,11 +162,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
def doPreInstall(self, anaconda):
if anaconda.dir == DISPATCH_BACK:
- for d in ("/selinux", "/dev"):
- try:
- isys.umount(anaconda.rootPath + d, removeDir = 0)
- except Exception, e:
- log.error("unable to unmount %s: %s" %(d, e))
+ anaconda.method.unmountNonFstabDirs()
return
anaconda.id.fsset.umountFilesystems(anaconda.rootPath, swapoff = False)