[node-patches] Change in ovirt-node[master]: Revert ovirtfunctions mount_live logic

rbarry at redhat.com rbarry at redhat.com
Tue Sep 23 18:30:15 UTC 2014


Ryan Barry has uploaded a new change for review.

Change subject: Revert ovirtfunctions mount_live logic
......................................................................

Revert ovirtfunctions mount_live logic

Side effects in the welcome page...

Change-Id: I98ce497bb53610a0e3fd2319972f8a1a6d8c35af
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1144296
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirtnode/ovirtfunctions.py
1 file changed, 15 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/92/33292/1

diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index 5b0fcfa..0daad69 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -522,24 +522,21 @@
         if is_iscsi_install():
             connect_iscsi_root()
         system_closefds("mkdir -p /liveos")
-        if not "CDLABEL" in open("/proc/cmdline").read() and \
-                not "reinstall" in open("/proc/cmdline"):
-            if not system("mount LABEL=Root /liveos &>/dev/null"):
-                # just in case /dev/disk/by-label is not using devmapper and fails
-                for dev in os.listdir("/dev/mapper"):
-                    if system("e2label \"/dev/mapper/" + dev + "\" 2>/dev/null|grep Root|grep -v Backup"):
-                        system("rm -rf /dev/disk/by-label/Root")
-                        system("ln -s \"/dev/mapper/" + dev + "\" /dev/disk/by-label/Root")
-                        if system("mount LABEL=Root /liveos"):
-                            return True
-        elif "CDLABEL" in open("/proc/cmdline").read() or \
-                "reinstall" in open("/proc/cmdline"):
-            if os.path.ismount("/dev/.initramfs/live"):
-                system_closefds("mount -o bind /dev/.initramfs/live /liveos")
-            elif os.path.ismount("/run/initramfs/live"):
-                system_closefds("mount -o bind /run/initramfs/live /liveos")
-            else:
-                return False
+        if not system("mount LABEL=Root /liveos &>/dev/null"):
+            # just in case /dev/disk/by-label is not using devmapper and fails
+            for dev in os.listdir("/dev/mapper"):
+                if system("e2label \"/dev/mapper/" + dev + "\" 2>/dev/null|grep Root|grep -v Backup"):
+                    system("rm -rf /dev/disk/by-label/Root")
+                    system("ln -s \"/dev/mapper/" + dev + "\" /dev/disk/by-label/Root")
+                    if system("mount LABEL=Root /liveos"):
+                        return True
+                    else:
+                        if os.path.ismount("/dev/.initramfs/live"):
+                            system_closefds("mount -o bind /dev/.initramfs/live /liveos")
+                        elif os.path.ismount("/run/initramfs/live"):
+                            system_closefds("mount -o bind /run/initramfs/live /liveos")
+                        else:
+                            return False
         else:
             return True
 


-- 
To view, visit http://gerrit.ovirt.org/33292
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98ce497bb53610a0e3fd2319972f8a1a6d8c35af
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list