summaryrefslogtreecommitdiff
path: root/testing/scripts
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2007-04-12 20:41:31 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2007-04-12 20:41:31 +0000
commit774a362e87feab25f1be16fbca08269ddc7121a4 (patch)
treecf71f4e7466468ac3edc2127125f333224a9acfb /testing/scripts
parentc54a140a445bfe7aa66721f68bb0781f26add91c (diff)
downloadvyos-strongswan-774a362e87feab25f1be16fbca08269ddc7121a4.tar.gz
vyos-strongswan-774a362e87feab25f1be16fbca08269ddc7121a4.zip
Major new upstream release, just ran svn-upgrade for now (and wrote some
debian/changelong entries).
Diffstat (limited to 'testing/scripts')
-rwxr-xr-xtesting/scripts/build-hostconfig2
-rwxr-xr-xtesting/scripts/build-sshkeys2
-rwxr-xr-xtesting/scripts/build-umlhostfs1
-rwxr-xr-xtesting/scripts/build-umlrootfs33
-rwxr-xr-xtesting/scripts/install-shared38
-rwxr-xr-xtesting/scripts/kstart-umls2
-rwxr-xr-xtesting/scripts/load-testconfig6
-rwxr-xr-xtesting/scripts/restore-defaults2
-rwxr-xr-xtesting/scripts/shutdown-umls38
-rwxr-xr-xtesting/scripts/start-switches2
-rwxr-xr-xtesting/scripts/start-umls2
-rwxr-xr-xtesting/scripts/xstart-umls2
12 files changed, 110 insertions, 20 deletions
diff --git a/testing/scripts/build-hostconfig b/testing/scripts/build-hostconfig
index 28b321a70..1dd268719 100755
--- a/testing/scripts/build-hostconfig
+++ b/testing/scripts/build-hostconfig
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: build-hostconfig,v 1.4 2006/10/19 21:38:45 as Exp $
+# RCSID $Id: build-hostconfig,v 1.3 2005/02/08 10:40:48 as Exp $
DIR=`dirname $0`
diff --git a/testing/scripts/build-sshkeys b/testing/scripts/build-sshkeys
index 2faa3963d..23f62e005 100755
--- a/testing/scripts/build-sshkeys
+++ b/testing/scripts/build-sshkeys
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: build-sshkeys,v 1.3 2006/10/19 21:38:45 as Exp $
+# RCSID $Id: build-sshkeys,v 1.2 2005/02/15 14:12:16 as Exp $
DIR=`dirname $0`
diff --git a/testing/scripts/build-umlhostfs b/testing/scripts/build-umlhostfs
index e77bfc025..69ad9fe02 100755
--- a/testing/scripts/build-umlhostfs
+++ b/testing/scripts/build-umlhostfs
@@ -68,6 +68,7 @@ do
cp -rfp $BUILDDIR/hosts/${host}/etc $LOOPDIR
if [ "$host" = "winnetou" ]
then
+ mkdir $LOOPDIR/var/log/apache2/ocsp
cp -rfp $UMLTESTDIR/testing/images $LOOPDIR/var/www/localhost/htdocs
chroot $LOOPDIR /etc/openssl/generate-crl >> $LOGFILE 2>&1
fi
diff --git a/testing/scripts/build-umlrootfs b/testing/scripts/build-umlrootfs
index 1d534c81b..f839e3e8e 100755
--- a/testing/scripts/build-umlrootfs
+++ b/testing/scripts/build-umlrootfs
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: build-umlrootfs,v 1.12 2006/10/20 14:26:05 as Exp $
+# RCSID $Id: build-umlrootfs,v 1.11 2006/01/08 22:29:56 as Exp $
DIR=`dirname $0`
@@ -89,7 +89,6 @@ mount -o loop gentoo-fs $LOOPDIR >> $LOGFILE 2>&1
tar xjpf $ROOTFS -C $LOOPDIR >> $LOGFILE 2>&1
cecho "done"
-
######################################################
# remove /etc/resolv.conf
#
@@ -102,14 +101,21 @@ rm -f $LOOPDIR/etc/resolv.conf
cecho " * Copying '$HOSTCONFIGDIR/default/etc/hosts' to the root filesystem"
cp -fp $HOSTCONFIGDIR/default/etc/hosts $LOOPDIR/etc/hosts
-#
#####################################################
# extracting strongSwan into the root filesystem
#
-
cecho " * Extracting strongSwan into the root filesystem"
tar xjf $STRONGSWAN -C $LOOPDIR/root >> $LOGFILE 2>&1
+######################################################
+# setting up mountpoint for shared source tree
+#
+if [ "${SHAREDTREE+set}" = "set" ]; then
+ cecho " * setting up shared strongswan tree at '$SHAREDTREE'"
+ mkdir $LOOPDIR/root/strongswan-shared
+ echo "" >> $LOOPDIR/etc/fstab
+ echo "none /root/strongswan-shared hostfs $SHAREDTREE" >> $LOOPDIR/etc/fstab
+fi
######################################################
# installing strongSwan and setting the local timezone
@@ -120,20 +126,27 @@ INSTALLSHELL=${LOOPDIR}/install.sh
cecho " * Preparing strongSwan installation script"
echo "ln -sf /usr/share/zoneinfo/${TZUML} /etc/localtime" >> $INSTALLSHELL
+echo "cd /root/${STRONGSWANVERSION}" >> $INSTALLSHELL
+echo -n "./configure --sysconfdir=/etc" >> $INSTALLSHELL
+echo -n " --with-random-device=/dev/urandom" >> $INSTALLSHELL
if [ "$USE_LIBCURL" = "yes" ]
then
- echo "export USE_LIBCURL=true" >> $INSTALLSHELL
+ echo -n " --enable-http" >> $INSTALLSHELL
fi
if [ "$USE_LDAP" = "yes" ]
then
- echo "export USE_LDAP=true" >> $INSTALLSHELL
+ echo -n " --enable-ldap" >> $INSTALLSHELL
fi
-echo "export USERCOMPILE=\'-DRANDOM_DEVICE=\\\"/dev/urandom\\\"\'" >> $INSTALLSHELL
-echo "cd /root/${STRONGSWANVERSION}" >> $INSTALLSHELL
-echo "make programs" >> $INSTALLSHELL
+if [ "$USE_LEAK_DETECTIVE" = "yes" ]
+then
+ echo -n " --enable-leak-detective" >> $INSTALLSHELL
+fi
+echo "" >> $INSTALLSHELL
+echo "make" >> $INSTALLSHELL
echo "make install" >> $INSTALLSHELL
+echo "ldconfig" >> $INSTALLSHELL
cecho-n " * Compiling $STRONGSWANVERSION within the root file system as chroot.."
chroot $LOOPDIR /bin/bash /install.sh >> $LOGFILE 2>&1
@@ -159,7 +172,7 @@ cp $LOOPDIR/etc/ssh/ssh_host_rsa_key $LOOPDIR/root/.ssh/id_rsa
for host in $STRONGSWANHOSTS
do
- eval ip="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+ eval ip="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F- '{ print $1 }' | awk '{ print $1 }'`"
echo "$host,$ip `cat $HOSTCONFIGDIR/ssh_host_rsa_key.pub`" >> $LOOPDIR/root/.ssh/known_hosts
echo "`cat $HOSTCONFIGDIR/ssh_host_rsa_key.pub` root@$host" >> $LOOPDIR/root/.ssh/authorized_keys
done
diff --git a/testing/scripts/install-shared b/testing/scripts/install-shared
new file mode 100755
index 000000000..4cfac9e77
--- /dev/null
+++ b/testing/scripts/install-shared
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Install strongSwan from mounted strongswan-shared tree
+#
+# Copyright (C) 2006 Martin Willi
+# Hochschule fuer Technik Rapperswil
+# Copyright (C) 2004 Eric Marchionni, Patrik Rayo
+# Zuercher Hochschule Winterthur
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+
+DIR=`dirname $0`
+
+source $DIR/function.sh
+
+[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found"
+
+source $DIR/../testing.conf
+
+cecho "installing strongSwan from shared tree"
+cecho-n " on: "
+
+for host in $STRONGSWANHOSTS
+do
+ eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+ cecho-n "$host... "
+ ssh $HOSTLOGIN 'cd ~/strongswan-shared && make install' > /dev/null
+done
+
+cecho
diff --git a/testing/scripts/kstart-umls b/testing/scripts/kstart-umls
index 21baee52c..8379438c8 100755
--- a/testing/scripts/kstart-umls
+++ b/testing/scripts/kstart-umls
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: kstart-umls,v 1.7 2007/01/11 20:32:01 as Exp $
+# RCSID $Id: kstart-umls,v 1.6 2005/08/30 22:13:12 as Exp $
DIR=`dirname $0`
diff --git a/testing/scripts/load-testconfig b/testing/scripts/load-testconfig
index 9c0477e54..6558018c2 100755
--- a/testing/scripts/load-testconfig
+++ b/testing/scripts/load-testconfig
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: load-testconfig,v 1.3 2006/10/19 21:38:45 as Exp $
+# RCSID $Id: load-testconfig,v 1.2 2004/12/13 21:02:42 as Exp $
DIR=`dirname $0`
@@ -53,12 +53,12 @@ fi
##########################################################################
-# clear the auth.log where IKE messages are logged
+# clear auth.log and daemon.log where IKE messages are logged
#
for host in $IPSECHOSTS
do
eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
- ssh $HOSTLOGIN 'rm -f /var/log/auth.log; \
+ ssh $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
kill -SIGHUP `cat /var/run/syslogd.pid`' > /dev/null 2>&1
done
diff --git a/testing/scripts/restore-defaults b/testing/scripts/restore-defaults
index 03f723e82..b1dae1ea2 100755
--- a/testing/scripts/restore-defaults
+++ b/testing/scripts/restore-defaults
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: restore-defaults,v 1.3 2006/10/19 21:40:27 as Exp $
+# RCSID $Id: restore-defaults,v 1.2 2004/12/20 07:56:33 as Exp $
DIR=`dirname $0`
diff --git a/testing/scripts/shutdown-umls b/testing/scripts/shutdown-umls
new file mode 100755
index 000000000..e71e46602
--- /dev/null
+++ b/testing/scripts/shutdown-umls
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Install strongSwan from mounted strongswan-shared tree
+#
+# Copyright (C) 2006 Martin Willi
+# Hochschule fuer Technik Rapperswil
+# Copyright (C) 2004 Eric Marchionni, Patrik Rayo
+# Zuercher Hochschule Winterthur
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+
+DIR=`dirname $0`
+
+source $DIR/function.sh
+
+[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found"
+
+source $DIR/../testing.conf
+
+cecho "shutting down"
+cecho-n " "
+
+for host in $STRONGSWANHOSTS
+do
+ eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+ cecho-n "$host... "
+ ssh $HOSTLOGIN 'shutdown now -h' > /dev/null
+done
+
+cecho
diff --git a/testing/scripts/start-switches b/testing/scripts/start-switches
index c90c9f86d..82433babe 100755
--- a/testing/scripts/start-switches
+++ b/testing/scripts/start-switches
@@ -31,7 +31,7 @@ do
cecho " * Great, umlswitch$n is already running!"
else
cecho-n " * Starting umlswitch$n.."
- uml_switch -tap tap$n -unix /tmp/umlswitch$n >/dev/null </dev/null &
+ uml_switch -hub -tap tap$n -unix /tmp/umlswitch$n >/dev/null </dev/null &
sleep 2
eval ifconfig "tap$n \$IFCONFIG_$n up"
cecho "done"
diff --git a/testing/scripts/start-umls b/testing/scripts/start-umls
index 89d9e0d81..1b875a696 100755
--- a/testing/scripts/start-umls
+++ b/testing/scripts/start-umls
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: start-umls,v 1.6 2007/01/11 20:32:01 as Exp $
+# RCSID $Id: start-umls,v 1.5 2005/08/30 22:13:12 as Exp $
DIR=`dirname $0`
diff --git a/testing/scripts/xstart-umls b/testing/scripts/xstart-umls
index 5983d405f..9efbd1497 100755
--- a/testing/scripts/xstart-umls
+++ b/testing/scripts/xstart-umls
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: xstart-umls,v 1.7 2007/01/11 20:32:01 as Exp $
+# RCSID $Id: xstart-umls,v 1.6 2005/08/30 22:13:12 as Exp $
DIR=`dirname $0`