List daemon.log on $RADIUSHOSTS
[strongswan.git] / testing / start-testing
1 #!/bin/bash
2
3 DIR=$(dirname `readlink -f $0`)
4 . $DIR/testing.conf
5 . $DIR/scripts/function.sh
6
7 NETWORKS="vnet1 vnet2 vnet3"
8 CONFDIR=$DIR/config/kvm
9 KNLSRC=$BUILDDIR/$KERNEL/arch/x86/boot/bzImage
10 KNLTARGET=/var/run/kvm-swan-kernel
11 HOSTFSTARGET=/var/run/kvm-swan-hostfs
12
13 echo "Starting test environment"
14
15 [ `id -u` -eq 0 ] || die "You must be root to run $0"
16
17 check_commands virsh
18
19 log_action "Deploying kernel $KERNEL"
20 execute "ln -fs $KNLSRC $KNLTARGET"
21
22 log_action "Deploying $ROOTIMGCOMPILEDIR as hostfs"
23 execute "ln -Tfs $ROOTIMGCOMPILEDIR $HOSTFSTARGET"
24
25 for net in $NETWORKS
26 do
27         log_action "Network $net"
28         execute "virsh net-create $CONFDIR/$net.xml"
29 done
30
31 for host in $STRONGSWANHOSTS
32 do
33         ln -fs $IMGDIR/$host.$IMGEXT $VIRTIMGSTORE/$host.$IMGEXT
34         log_action "Guest $host"
35         execute "virsh create $CONFDIR/$host.xml"
36 done