diff options
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/defaults.sh | 16 | ||||
-rwxr-xr-x | functions/losetup.sh | 8 |
2 files changed, 4 insertions, 20 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index b8ac6204d..bfbffa37e 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -273,22 +273,6 @@ Set_config_defaults () ;; esac - # Setting losetup - if [ -z "${LB_LOSETUP}" ] || [ "${LB_LOSETUP}" != "/sbin/losetup.orig" ] - then - # Workaround for loop-aes-utils divertion - # (loop-aes-utils' losetup lacks features). - if [ -x /sbin/losetup.orig ] - then - LB_LOSETUP="losetup.orig" - elif [ -x /sbin/losetup ] - then - LB_LOSETUP="losetup" - else - Echo_error "Can't process file /sbin/losetup" - fi - fi - if [ "${LB_ARCHITECTURES}" = "i386" ] && [ "${CURRENT_IMAGE_ARCHITECTURE}" = "amd64" ] then # Use linux32 when building amd64 images on i386 diff --git a/functions/losetup.sh b/functions/losetup.sh index e0d2b6fdb..c3dd59641 100755 --- a/functions/losetup.sh +++ b/functions/losetup.sh @@ -32,7 +32,7 @@ Lodetach () sync sleep 1 - ${LB_LOSETUP} -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)" + losetup -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)" } Losetup () @@ -41,7 +41,7 @@ Losetup () FILE="${2}" PARTITION="${3:-1}" - ${LB_LOSETUP} --read-only --partscan "${DEVICE}" "${FILE}" + losetup --read-only --partscan "${DEVICE}" "${FILE}" FDISK_OUT="$(fdisk -l -u ${DEVICE} 2>&1)" Lodetach "${DEVICE}" @@ -51,14 +51,14 @@ Losetup () then Echo_message "Mounting %s with offset 0" "${DEVICE}" - ${LB_LOSETUP} --partscan "${DEVICE}" "${FILE}" + losetup --partscan "${DEVICE}" "${FILE}" else SECTORS="$(echo "$FDISK_OUT" | sed -ne "s|^$LOOPDEVICE[ *]*\([0-9]*\).*|\1|p")" OFFSET="$(expr ${SECTORS} '*' 512)" Echo_message "Mounting %s with offset %s" "${DEVICE}" "${OFFSET}" - ${LB_LOSETUP} --partscan -o "${OFFSET}" "${DEVICE}" "${FILE}" + losetup --partscan -o "${OFFSET}" "${DEVICE}" "${FILE}" fi } |