Last change
on this file since 857 was 311, checked in by Bruno Cornec, 17 years ago |
Used devel version for VM management
|
-
Property svn:executable
set to
*
|
File size:
808 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | (
|
---|
4 | export PBPROJ=pb
|
---|
5 | VER=devel
|
---|
6 | export PBROOT=/users/bruno/pb/svn/$VER
|
---|
7 |
|
---|
8 | if [ _"$1" == _"" ]; then
|
---|
9 | echo "Syntax: installqemu VM|all"
|
---|
10 | exit -1
|
---|
11 | fi
|
---|
12 | if [ _"$1" == _"all" ]; then
|
---|
13 | opt="`grep vmlist $PBROOT/pbconf/$PBPROJ.pb | grep $PBPROJ | cut -d= -f2 | sed 's/,/ /g'`"
|
---|
14 | opt64="`echo $opt | sed 's/ /_64 /g'`"
|
---|
15 | opt="$opt $opt64"
|
---|
16 | else
|
---|
17 | opt="`echo $* | sed 's/,/ /g'`"
|
---|
18 | fi
|
---|
19 |
|
---|
20 | for m in $opt; do
|
---|
21 | echo "Launching script on $m"
|
---|
22 | pb -m $m -a root -s /users/bruno/pb/svn/$VER/pb/contrib/installpb script2vm
|
---|
23 | echo "Halting $m"
|
---|
24 | echo "/sbin/halt -p" > /tmp/pbscript
|
---|
25 | pb -m $m -a root -s /tmp/pbscript script2vm
|
---|
26 | sleep 120
|
---|
27 | job=`ps auhxww | grep qemu | grep -Ev 'grep|installqemu' | awk '{print $2}'`
|
---|
28 | if [ _"$job" != _"" ]; then
|
---|
29 | echo "Really halting $m"
|
---|
30 | kill $job
|
---|
31 | fi
|
---|
32 | done
|
---|
33 | ) 2>&1 | tee /tmp/installqemu.log
|
---|
Note:
See
TracBrowser
for help on using the repository browser.