aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scripts/build-umlhostfs
diff options
context:
space:
mode:
authorReto Buerki <reet@codelabs.ch>2012-12-10 10:05:02 +0100
committerTobias Brunner <tobias@strongswan.org>2013-01-17 16:54:55 +0100
commit258cbd40cff463f4adb57f40d3338e460c7e90f2 (patch)
tree583071ab62498bf3213861a09e676e3f22d94b48 /testing/scripts/build-umlhostfs
parentaba43136c262151b3f213a2253eddc62a07c7e88 (diff)
downloadstrongswan-258cbd40cff463f4adb57f40d3338e460c7e90f2.tar.bz2
strongswan-258cbd40cff463f4adb57f40d3338e460c7e90f2.tar.xz
Unify naming of base,root image settings
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