X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=89708341f969811815c0481607878a0551a3befa;hb=65b87457c49ed23c23906505eaf65dae1b9cfae8;hp=f6b8b8bf15fbe75c69ee1e3243b121f520d5bb0f;hpb=e0a050e3bcf51cf0bb1df9490487e0619d4aa9f9;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index f6b8b8b..8970834 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -77,7 +77,7 @@ get_fstype () return fi - eval $(fstype < ${1} 2>/dev/null) + eval $(fstype ${1} 2>/dev/null) if [ "${FSTYPE}" != "unknown" ] then @@ -206,7 +206,7 @@ setup_loop () dev=$(sys2dev "${loopdev}") options='' - if [ -n ${readonly} ] + if [ -n "${readonly}" ] then if losetup --help 2>&1 | grep -q -- "-r\b" then @@ -299,6 +299,13 @@ find_cow_device () cow_backing="/${pers_label}-backing" black_listed_devices="${2}" + if [ -z "${PERSISTENT_PATH}" ] + then + pers_fpath=${cow_backing}/${pers_label} + else + pers_fpath=${cow_backing}/${PERSISTENT_PATH}/${pers_label} + fi + for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd) do for dev in $(subdevices "${sysblock}") @@ -332,9 +339,9 @@ find_cow_device () break fi - if [ -f "${cow_backing}/${pers_label}" ] + if [ -f "${pers_fpath}" ] then - echo $(setup_loop "${cow_backing}/${pers_label}" "loop" "/sys/block/loop*") + echo $(setup_loop "${pers_fpath}" "loop" "/sys/block/loop*") return 0 else umount ${cow_backing}