added autostart-all and autostop-all
[public/kvm-scripts.git] / autostart.sh
1 #!/bin/bash
2 if [ $# -lt 1 ] ; then
3         echo "$0 <machine-conf>"
4         exit
5 fi
6 if [ ! -f $1 ] ; then
7         echo "<machine conf> does not exists at $1";
8         exit
9 fi
10 . $1
11 if [ ${AUTOSTART} -ne 1 ] ; then
12         echo "$1 not autostarting"
13         exit
14 else 
15         echo "$1 autostart"
16 fi
17 shift
18 . _run/${TYPE}.sh