summaryrefslogtreecommitdiff
path: root/scripts/build/source_hdd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-12-19 12:41:02 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 14:50:03 +0200
commitef1ab80c70a8a492f87bbb76dffac9c10811a24d (patch)
tree0d6937f2aea46afa3e49986712c1dfdf3fada483 /scripts/build/source_hdd
parent36d36414d89fe376030c40f59a2f8d5b3229316d (diff)
downloadvyos-live-build-ef1ab80c70a8a492f87bbb76dffac9c10811a24d.tar.gz
vyos-live-build-ef1ab80c70a8a492f87bbb76dffac9c10811a24d.zip
Using image name from configuration to name source output files.
Diffstat (limited to 'scripts/build/source_hdd')
-rwxr-xr-xscripts/build/source_hdd12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/build/source_hdd b/scripts/build/source_hdd
index 0d764079c..393b68223 100755
--- a/scripts/build/source_hdd
+++ b/scripts/build/source_hdd
@@ -56,15 +56,15 @@ Check_package chroot/sbin/parted parted
Install_package
# Remove old source
-if [ -f source.img ]
+if [ -f ${LIVE_IMAGE_NAME}-source.img ]
then
- rm -f source.img
+ rm -f ${LIVE_IMAGE_NAME}-source.img
fi
# Everything which comes here needs to be cleaned up,
DU_DIM="$(du -ms source | cut -f1)"
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})"
-dd if=/dev/zero of=source.img bs=1024k count=0 seek=${REAL_DIM}
+dd if=/dev/zero of=${LIVE_IMAGE_NAME}-source.img bs=1024k count=0 seek=${REAL_DIM}
FREELO="$(${LB_LOSETUP} -f)"
if [ ! -b chroot/${FREELO} ]
then
@@ -94,12 +94,12 @@ case "${LB_BINARY_FILESYSTEM}" in
esac
Echo_warning "!!! The following error/warning messages can be ignored !!!"
-Losetup $FREELO source.img 0
+Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 0
Chroot chroot "parted -s ${FREELO} mklabel msdos" || true
Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true
Lodetach ${FREELO}
-Losetup $FREELO source.img 1
+Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 1
case "${LB_BINARY_FILESYSTEM}" in
ext2|ext3|ext4)
@@ -134,7 +134,7 @@ Lodetach ${FREELO}
Echo_warning "!!! The above error/warning messages can be ignored !!!"
FREELO="$(${LB_LOSETUP} -f)"
-Losetup "$FREELO" source.img 0
+Losetup "$FREELO" ${LIVE_IMAGE_NAME}-source.img 0
Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
Lodetach ${FREELO}