From: Daniel Baumann Date: Fri, 22 Jan 2010 08:58:54 +0000 (+0100) Subject: Don't panic with persistency when we can't correctly mount the filesystem (Closes... X-Git-Tag: debian/2.0.15-1~234 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=a2876e705ad31d248118454ce9d7bfc5c2eda849;p=live-boot-grml.git Don't panic with persistency when we can't correctly mount the filesystem (Closes: #565456). --- diff --git a/scripts/live-helpers b/scripts/live-helpers index 84d460b..6edd51c 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -287,7 +287,8 @@ try_mount () then fstype=$(get_fstype "${dev}") fi - mount -t "${fstype}" -o "${opts}" "${dev}" "${mountp}" || panic "Cannot mount ${dev} on ${mountp}, fstype=${fstype}, options=${opts}" + mount -t "${fstype}" -o "${opts}" "${dev}" "${mountp}" || \ + ( echo "SKIPPING: Cannot mount ${dev} on ${mountp}, fstype=${fstype}, options=${opts}" > live.log && return 0 ) fi } @@ -376,17 +377,15 @@ find_cow_device () case "$(get_fstype ${devname})" in vfat|ext2|ext3|ext4|jffs2) mkdir -p "${cow_backing}" - if ! try_mount "${devname}" "${cow_backing}" "rw" + if try_mount "${devname}" "${cow_backing}" "rw" then - break - fi - - if [ -f "${pers_fpath}" ] - then - echo $(setup_loop "${pers_fpath}" "loop" "/sys/block/loop*") - return 0 - else - umount ${cow_backing} + if [ -f "${pers_fpath}" ] + then + echo $(setup_loop "${pers_fpath}" "loop" "/sys/block/loop*") + return 0 + else + umount ${cow_backing} > /dev/null 2>&1 || true + fi fi ;; *)