summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-07-21 17:24:08 +0200
committerDaniel Baumann <daniel@debian.org>2011-07-21 17:24:08 +0200
commit8316bd2d9813cbc7b2b8288b6618eec2c2004028 (patch)
tree0b5908b06ff5ec56b1ac0802ead6c62dfefe5c1f
parent0aab94aac9a07f450dd69e7897428b28c27879a4 (diff)
downloadvyos-live-build-8316bd2d9813cbc7b2b8288b6618eec2c2004028.tar.gz
vyos-live-build-8316bd2d9813cbc7b2b8288b6618eec2c2004028.zip
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.
-rwxr-xr-xscripts/build/lb_binary_disk12
1 files changed, 6 insertions, 6 deletions
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