use /dev/loop0 only when it really contains LiveCD ISO.
mount_live should fail silently when LiveCD ISO is not available,
which is the case on boot from HostVG/Root.
Resolves: rhbz#508425
---
scripts/ovirt-functions | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
mode change 100755 => 100644 scripts/ovirt-functions
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
old mode 100755
new mode 100644
index 81db36b..a536236
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -249,9 +249,11 @@ mount_live() {
return 0
fi
local live_dev=/dev/live
- if [ ! -e $live_dev ]; then
+ if [ ! -e $live_dev ] && losetup /dev/loop0|grep -q
'\.iso'; then
# PXE boot
live_dev=/dev/loop0
+ else
+ return 1
fi
mkdir -p /live
mount -r $live_dev /live || mount $live_dev /live
--
1.6.0.6