aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scripts/build-umlhostfs
diff options
context:
space:
mode:
Diffstat (limited to 'testing/scripts/build-umlhostfs')
-rwxr-xr-xtesting/scripts/build-umlhostfs8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/scripts/build-umlhostfs b/testing/scripts/build-umlhostfs
index ed026b6e8..fc2660c08 100755
--- a/testing/scripts/build-umlhostfs
+++ b/testing/scripts/build-umlhostfs
@@ -20,10 +20,9 @@ echo "Creating guest images"
[ `id -u` -eq 0 ] || die "You must be root to run $0"
-BASE=$BUILDDIR/base.qcow2
HOSTSDIR=$PWD/hosts
-[ -f $BASE ] || die "Base image $BASE not found"
+[ -f $ROOTIMG ] || die "Root image $ROOTIMG not found"
[ -f $HOSTDIR ] || die "Hosts directory $HOSTSDIR not found"
check_commands partprobe qemu-img qemu-nbd
@@ -32,6 +31,7 @@ load_qemu_nbd
mkdir -p $BUILDDIR
mkdir -p $LOOPDIR
+mkdir -p $GUESTIMGDIR
if [ "$#" -eq 0 ]; then
HOSTS=$STRONGSWANHOSTS
@@ -46,8 +46,8 @@ do_on_exit umount $LOOPDIR
for host in $HOSTS
do
log_action "Creating guest image for $host"
- execute "qemu-img create -b $BASE -f qcow2 $ROOTFSDIR/$host.qcow2" 0
- execute "qemu-nbd -c $NBDEV $ROOTFSDIR/$host.qcow2" 0
+ execute "qemu-img create -b $ROOTIMG -f $IMGEXT $GUESTIMGDIR/$host.$IMGEXT" 0
+ execute "qemu-nbd -c $NBDEV $GUESTIMGDIR/$host.$IMGEXT" 0
partprobe $NBDEV
execute "mount $NBDPARTITION $LOOPDIR" 0
execute "cp -rf $HOSTSDIR/${host}/etc $LOOPDIR" 0