xentaur

view files/xenomips.sh @ 58:58381d1fe31b

domains_brief support
author igor
date Sun Nov 11 19:22:52 2007 +0200 (2007-11-11)
parents de23c23ef4ac
children 6471afbee150
line source
1 #!/bin/sh
3 case $1 in
4 start)
5 if grep -qi xenomips /proc/cmdline
6 then
7 DYNAMIPS_WORKDIR="/xenomips/config"
8 DYNAMIPS_ARGS=`cat /proc/cmdline | sed 's/.*xenomips="//; s/".*//'`
9 cd "$DYNAMIPS_WORKDIR"
10 screen -e '^xx' -d -m sh -c "while true; do dynamips $DYNAMIPS_ARGS ; done"
11 else
12 /etc/init.d/quagga start
13 screen -e '^xx' -d -m sh -c 'while true; do vtysh; done'
14 fi
15 ;;
16 stop)
17 if grep -qi xenomips /proc/cmdline
18 then
19 kill $(ps aux | grep dynamips | awk '{print $2}')
20 else
21 /etc/init.d/quagga stop
22 fi
23 ;;
24 esac