Don't check if mountpoint is a valid live_path if the specified iso file
in the findiso parameter is not found. This makes sure that findiso uses
the specified iso instead of any other valid device like usb pens or cdroms.
@DPATCH@
diff --git a/scripts/live b/scripts/live
@DPATCH@
diff --git a/scripts/live b/scripts/live
-index d79beed..04ad61e 100755
+index 5681362..86a0ce6 100755
--- a/scripts/live
+++ b/scripts/live
--- a/scripts/live
+++ b/scripts/live
-@@ -102,6 +102,11 @@ Arguments ()
- export FETCH
- ;;
+@@ -106,6 +106,11 @@ Arguments ()
+ export FETCH
+ ;;
+ findiso=*)
+ FINDISO="${ARGUMENT#findiso=}"
+ findiso=*)
+ FINDISO="${ARGUMENT#findiso=}"
forcepersistentfsck)
FORCEPERSISTENTFSCK="Yes"
export FORCEPERSISTENTFSCK
forcepersistentfsck)
FORCEPERSISTENTFSCK="Yes"
export FORCEPERSISTENTFSCK
-@@ -1526,6 +1531,19 @@ check_dev ()
+@@ -1629,6 +1634,21 @@ check_dev ()
mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
[ -n "$devuid" ] && echo "$devuid" >> $tried
mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
[ -n "$devuid" ] && echo "$devuid" >> $tried
+ loopdevname=$(setup_loop "/live/findiso/${FINDISO}" "loop" "/sys/block/loop*" 0 "")
+ devname="${loopdevname}"
+ mount -t iso9660 -o ro,noatime "${devname}" ${mountpoint}
+ loopdevname=$(setup_loop "/live/findiso/${FINDISO}" "loop" "/sys/block/loop*" 0 "")
+ devname="${loopdevname}"
+ mount -t iso9660 -o ro,noatime "${devname}" ${mountpoint}
++ else
++ umount ${mountpoint}
+ fi
+ fi
+
if is_live_path ${mountpoint} && \
([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
then
+ fi
+ fi
+
if is_live_path ${mountpoint} && \
([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
then
-diff --git a/scripts/live b/scripts/live
-index d79beed..d19a5c5 100755
---- a/scripts/live
-+++ b/scripts/live
-@@ -1831,6 +1831,22 @@ mountroot ()
+@@ -1933,6 +1953,22 @@ mountroot ()
# when booting FAI, this simple workaround solves it
ls /root/* >/dev/null 2>&1
# when booting FAI, this simple workaround solves it
ls /root/* >/dev/null 2>&1