xentaur

view files/xenomips.sh @ 55:ec48cf129028

configure_no_cdp_log_mismatch_duplex
author igor
date Thu Oct 25 22:24:38 2007 +0300 (2007-10-25)
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