imgcreate/creator.py |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 397021f9f8e1621bc96e6c97c1ab51ccc6071d6b
Author: Brian C. Lane <[email protected]>
Date:   Wed Jan 18 16:18:25 2012 -0800

    selinux may be off on the host, skip mount (#737064)

diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 745a481..e09bdcf 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -445,6 +445,9 @@ class ImageCreator(object):
         os.umask(origumask)
 
     def __create_selinuxfs(self):
+        if not os.path.exists(self.__selinux_mountpoint):
+            return
+
         arglist = ["/bin/mount", "--bind", "/dev/null", self._instroot + 
self.__selinux_mountpoint + "/load"]
         subprocess.call(arglist, close_fds = True)
 
@@ -460,6 +463,9 @@ class ImageCreator(object):
                 subprocess.call(arglist, close_fds = True)
 
     def __destroy_selinuxfs(self):
+        if not os.path.exists(self.__selinux_mountpoint):
+            return
+
         # if the system was running selinux clean up our lies
         arglist = ["/bin/umount", self._instroot + self.__selinux_mountpoint + 
"/load"]
         subprocess.call(arglist, close_fds = True)


--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to