2 # starts the UML switches
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
17 # RCSID $Id: start-switches,v 1.2 2004/12/19 19:17:25 as Exp $
21 source $DIR/function.sh
23 [ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found"
25 source $DIR/../testing.conf
29 if [ `ps aux | grep uml_switch | grep umlswitch$n | wc -l` -eq 1 ]
31 cecho " * Great, umlswitch$n is already running!"
33 cecho-n " * Starting umlswitch$n.."
34 uml_switch -hub -tap tap$n -unix /tmp/umlswitch$n >/dev/null </dev/null &
36 eval ifconfig "tap$n \$IFCONFIG_$n up"