2 # Create the strongSwan UML testing environment
4 # Copyright (C) 2004 Eric Marchionni, Patrik Rayo
5 # Zuercher Hochschule Winterthur
7 # This program is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 2 of the License, or (at your
10 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 source $DIR/scripts/function.sh
21 [ -f $DIR/testing.conf ] || die "!! Configuration file 'testing.conf' not found."
23 source $DIR/testing.conf
28 HOSTS=$STRONGSWANHOSTS
33 ##########################################################################
36 if [ $ENABLE_BUILD_BASEIMAGE = "yes" ]
38 $DIR/scripts/build-baseimage
42 ##########################################################################
43 # build the UML kernel based on a vanilla kernel form kernel.org
44 # and a matching UML patch from user-mode-linux.sourceforge.net
46 if [ $ENABLE_BUILD_UMLKERNEL = "yes" ]
48 $DIR/scripts/build-umlkernel
51 ##########################################################################
52 # build a generic UML root file system based on a Gentoo root file system.
53 # compile and install a specified strongSwan release into the file system.
55 if [ $ENABLE_BUILD_UMLROOTFS = "yes" ]
57 $DIR/scripts/build-umlrootfs
60 ##########################################################################
61 # copy the default UML host configurations to $BUILDDIR
62 # and assign actual IP addresses to the UML hosts
64 if [ $ENABLE_BUILD_HOSTCONFIG = "yes" ]
66 cecho "Building host configurations (scripts/build-hostconfig)"
67 $DIR/scripts/build-hostconfig
70 ##########################################################################
71 # Creating the root filesystems for the specified UML instances
73 if [ $ENABLE_BUILD_UMLHOSTFS = "yes" ]
75 cecho "Building uml host images (scripts/build-umlhostfs)"
76 $DIR/scripts/build-umlhostfs $HOSTS