]> git.ipfire.org Git - thirdparty/strongswan.git/blame - testing/stop-testing
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / testing / stop-testing
CommitLineData
997358a6
MW
1#!/bin/bash
2# Stop all UML instances and UML switches
3#
4# Copyright (C) 2004 Eric Marchionni, Patrik Rayo
5# Zuercher Hochschule Winterthur
6#
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>.
11#
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
15# for more details.
16#
17# RCSID $Id: stop-testing,v 1.3 2004/12/07 18:04:57 as Exp $
18
19DIR=`dirname $0`
20
21source $DIR/scripts/function.sh
22
23[ -f $DIR/testing.conf ] || die "No configuration file testing.conf found."
24
25source $DIR/testing.conf
26
27if [ "$#" -eq 0 ]
28then
29 HOSTS=$STRONGSWANHOSTS
30else
31 HOSTS=$*
32fi
33
34#####################################################
35# Shutting down the uml instances
36#
37cecho-n " * Halting all UML instances.."
38for host in $HOSTS
39do
40 uml_mconsole $host halt &> /dev/null
41done
42cecho "done"
43
44#####################################################
45# Shutting down the uml switches
46#
47cecho-n " * Stopping the UML switches.."
48killall uml_switch &> /dev/null
49rm -f /tmp/umlswitch[012] &> /dev/null 2>&1
50cecho "done"
51