[node-patches] Change in ovirt-node[master]: ovirtfunctions: Fix mount_liveos
fabiand at redhat.com
fabiand at redhat.com
Fri Jul 10 14:43:17 UTC 2015
Fabian Deutsch has uploaded a new change for review.
Change subject: ovirtfunctions: Fix mount_liveos
......................................................................
ovirtfunctions: Fix mount_liveos
Previously a fallback was only used in case that a device in /dev/mapper
was found, but this actually prevent the fallback from acting like a fallback.
Change-Id: I0735036f23ab363f57a51853718d7f56baa5a087
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirtnode/ovirtfunctions.py
1 file changed, 8 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/18/43418/1
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index 1cddafd..a61b290 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -530,15 +530,14 @@
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
+ if os.path.ismount("/dev/.initramfs/live"):
+ if system_closefds("mount -o bind /dev/.initramfs/live /liveos"):
+ return True
+ elif os.path.ismount("/run/initramfs/live"):
+ if system_closefds("mount -o bind /run/initramfs/live /liveos"):
+ return True
+
+ return False
def mount_efi(target="/liveos/efi"):
# Moved to the new codebase
--
To view, visit https://gerrit.ovirt.org/43418
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0735036f23ab363f57a51853718d7f56baa5a087
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
More information about the node-patches
mailing list