[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] bugfix- livecd.py support for non-selinux installations



I tested this patch-against-current-cvs, against an f7 livecd spin, under qemu.

-dmc
diff -Naur anaconda.200709140049/livecd.py anaconda.livecd_noselinux_fix/livecd.py
--- anaconda.200709140049/livecd.py	2007-09-04 15:22:10.000000000 +0000
+++ anaconda.livecd_noselinux_fix/livecd.py	2007-09-14 13:31:43.000000000 +0000
@@ -100,11 +100,17 @@
 
     def postAction(self, anaconda):
         # unmount things that aren't listed in /etc/fstab.  *sigh*
-        for dir in ("/selinux", "/dev"):
+        if flags.selinux:
             try:
-                isys.umount("%s/%s" %(anaconda.rootPath,dir), removeDir = 0)
+                isys.umount("%s/selinux" %(anaconda.rootPath,), removeDir = 0)
             except Exception, e:
-                log.error("unable to unmount %s: %s" %(dir, e))
+                log.error("unable to unmount /selinux: %s" %(e,))
+
+        try:
+            isys.umount("%s/dev" %(anaconda.rootPath,), removeDir = 0)
+        except Exception, e:
+            log.error("unable to unmount /dev: %s" %(e,))
+
 
         try:
             anaconda.id.fsset.umountFilesystems(anaconda.rootPath,
@@ -157,11 +163,15 @@
 
     def doPreInstall(self, anaconda):
         if anaconda.dir == DISPATCH_BACK:
-            for d in ("/selinux", "/dev"):
+            if flags.selinux:
                 try:
-                    isys.umount(anaconda.rootPath + d, removeDir = 0)
+                    isys.umount(anaconda.rootPath + "/selinux", removeDir = 0)
                 except Exception, e:
-                    log.error("unable to unmount %s: %s" %(d, e))
+                    log.error("unable to unmount /selinux: %s" %(e,))
+            try:
+                isys.umount(anaconda.rootPath + "/dev", removeDir = 0)
+            except Exception, e:
+                log.error("unable to unmount /dev: %s" %(e,))
             return
 
         anaconda.id.fsset.umountFilesystems(anaconda.rootPath, swapoff = False)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]