diff options
author | Cody A.W. Somerville <cody.somerville@canonical.com> | 2011-07-21 17:00:54 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-07-21 17:00:54 +0200 |
commit | 0d2cc22efc66e919848fe0b6559e5b59b08e0afa (patch) | |
tree | 7ae736f6f933cbd73759eb010f67010409e34ad4 /scripts | |
parent | ebc7a72501339a76f4ab66d37d4aefc0d0ee4a67 (diff) | |
download | vyos-live-build-0d2cc22efc66e919848fe0b6559e5b59b08e0afa.tar.gz vyos-live-build-0d2cc22efc66e919848fe0b6559e5b59b08e0afa.zip |
Adding function for more resilient detachment of loopback devices.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/lb_binary_usb | 9 | ||||
-rwxr-xr-x | scripts/build/lb_source_usb | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/scripts/build/lb_binary_usb b/scripts/build/lb_binary_usb index e6c29ea7f..96feee499 100755 --- a/scripts/build/lb_binary_usb +++ b/scripts/build/lb_binary_usb @@ -164,8 +164,7 @@ case "${LB_BUILD_WITH_CHROOT}" in ;; esac -sleep 1 -${LB_LOSETUP} -d ${FREELO} +Lodetach ${FREELO} FREELO="$(${LB_LOSETUP} -f)" Losetup $FREELO chroot/binary.img 1 @@ -254,8 +253,7 @@ then esac fi -sleep 1 -${LB_LOSETUP} -d ${FREELO} +Lodetach ${FREELO} echo "!!! The above error/warning messages can be ignored !!!" @@ -274,8 +272,7 @@ case "${LB_BUILD_WITH_CHROOT}" in ;; esac -sleep 1 -${LB_LOSETUP} -d ${FREELO} +Lodetach ${FREELO} if [ -n "${MAKEDEV}" ] then diff --git a/scripts/build/lb_source_usb b/scripts/build/lb_source_usb index 166e86ace..9a598e4f4 100755 --- a/scripts/build/lb_source_usb +++ b/scripts/build/lb_source_usb @@ -93,8 +93,7 @@ Echo_warning "!!! The following error/warning messages can be ignored !!!" Losetup $FREELO source.img 0 Chroot chroot "parted -s ${FREELO} mklabel msdos" || true Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true -sleep 1 -${LB_LOSETUP} -d ${FREELO} +Lodetach ${FREELO} Losetup $FREELO source.img 1 @@ -122,15 +121,13 @@ ${LB_ROOT_COMMAND} mount ${FREELO} source.tmp cp -r source/* source.tmp ${LB_ROOT_COMMAND} umount source.tmp rmdir source.tmp -sleep 1 -${LB_LOSETUP} -d ${FREELO} +Lodetach ${FREELO} Echo_warning "!!! The above error/warning messages can be ignored !!!" FREELO="$(${LB_LOSETUP} -f)" Losetup "$FREELO" source.img 0 Chroot chroot "parted -s ${FREELO} set 1 lba off" || true -sleep 1 -${LB_LOSETUP} -d ${FREELO} +Lodetach ${FREELO} if [ -n "${MAKEDEV}" ] then |