diff options
| author | Daniel Baumann <daniel@debian.org> | 2010-01-22 09:58:54 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:07 +0100 |
| commit | a2876e705ad31d248118454ce9d7bfc5c2eda849 (patch) | |
| tree | da7b93e26b873085dec2217cfdf7ec4a6a3e96de | |
| parent | f62604650b982a6618972cb3aed06feafe919821 (diff) | |
| download | live-boot-a2876e705ad31d248118454ce9d7bfc5c2eda849.tar.gz live-boot-a2876e705ad31d248118454ce9d7bfc5c2eda849.zip | |
Don't panic with persistency when we can't correctly mount the filesystem (Closes: #565456).
| -rw-r--r-- | scripts/live-helpers | 21 |
1 files changed, 10 insertions, 11 deletions
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 ;; *) |
