]>
Commit | Line | Data |
---|---|---|
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 | ||
19 | DIR=`dirname $0` | |
20 | ||
21 | source $DIR/scripts/function.sh | |
22 | ||
23 | [ -f $DIR/testing.conf ] || die "No configuration file testing.conf found." | |
24 | ||
25 | source $DIR/testing.conf | |
26 | ||
27 | if [ "$#" -eq 0 ] | |
28 | then | |
29 | HOSTS=$STRONGSWANHOSTS | |
30 | else | |
31 | HOSTS=$* | |
32 | fi | |
33 | ||
34 | ##################################################### | |
35 | # Shutting down the uml instances | |
36 | # | |
37 | cecho-n " * Halting all UML instances.." | |
38 | for host in $HOSTS | |
39 | do | |
40 | uml_mconsole $host halt &> /dev/null | |
41 | done | |
42 | cecho "done" | |
43 | ||
44 | ##################################################### | |
45 | # Shutting down the uml switches | |
46 | # | |
47 | cecho-n " * Stopping the UML switches.." | |
48 | killall uml_switch &> /dev/null | |
49 | rm -f /tmp/umlswitch[012] &> /dev/null 2>&1 | |
50 | cecho "done" | |
51 |