From 8316bd2d9813cbc7b2b8288b6618eec2c2004028 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 21 Jul 2011 17:24:08 +0200 Subject: Correcting uuid extraction from initrds in ubuntu mode to work from within binary so that it is cleaned up by lb_clean on failed builds. --- scripts/build/lb_binary_disk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/build') diff --git a/scripts/build/lb_binary_disk b/scripts/build/lb_binary_disk index b592b889e..b1c47287b 100755 --- a/scripts/build/lb_binary_disk +++ b/scripts/build/lb_binary_disk @@ -86,12 +86,12 @@ fi case "${LB_INITRAMFS}" in casper) - for INITRD in binary/casper/initrd.img* + for INITRD in $(ls binary/casper/initrd.img* > /dev/null 2>&1) do - mkdir -p uuid - cd uuid + mkdir -p binary/uuid + cd binary/uuid - zcat "../${INITRD}" | cpio --quiet -id conf/uuid.conf + zcat "../../${INITRD}" | cpio --quiet -id conf/uuid.conf if [ -e conf/uuid.conf ] then @@ -100,8 +100,8 @@ case "${LB_INITRAMFS}" in Echo_warning "Failed to find casper uuid.conf in '${INITRD}'" fi - cd .. - rm -rf uuid + cd ${OLDPWD} + rm -rf binary/uuid done ;; esac -- cgit v1.2.3