1 |
|
---|
2 | default_image="orbit-1.1.4"
|
---|
3 |
|
---|
4 | # Set up pxe links on repository2 for pxe boot
|
---|
5 |
|
---|
6 | echo "$1" > node
|
---|
7 |
|
---|
8 | node_x=`cut -f1 -d',' node`
|
---|
9 |
|
---|
10 | node_y=`cut -f2 -d',' node`
|
---|
11 |
|
---|
12 | node_id="node"$node_x"-"$node_y
|
---|
13 |
|
---|
14 | #echo " Node ID is $node_id"
|
---|
15 |
|
---|
16 | #echo " X coordinate of node is $node_x, Y co-ordinate of node is $node_y"
|
---|
17 |
|
---|
18 | #echo " my console is `hostname -d | cut -f1 -d'.'` "
|
---|
19 |
|
---|
20 |
|
---|
21 |
|
---|
22 | sub=`/sbin/ifconfig eth1 | grep 'inet addr' | cut -c21-26`
|
---|
23 |
|
---|
24 | subnet_ip=$sub"0.0"
|
---|
25 |
|
---|
26 | echo "My subnet number is $subnet_ip"
|
---|
27 |
|
---|
28 | #echo "The nodes given are $1"
|
---|
29 |
|
---|
30 | wget -O - "http://pxe:5012/pxe/setBootImage?img=$default_image&ip=$subnet_ip"
|
---|
31 |
|
---|
32 | # Reset the selected nodes using cmc service
|
---|
33 |
|
---|
34 | wget -O - 'http://cmc:5012/cmc/allReset'
|
---|
35 |
|
---|
36 | # Launch the frisbee server
|
---|
37 |
|
---|
38 | wget -O - "http://frisbee:5012/frisbee/getAddress?img=$2"
|
---|
39 |
|
---|
40 | function usage()
|
---|
41 | {
|
---|
42 | echo "Usage: $0 {atheros|intel|all} image_file_path" >&2
|
---|
43 | echo "for example:" >&2
|
---|
44 | echo " $0 all tmp/image-tridencom-test.ndz" >&2
|
---|
45 | }
|
---|
46 | if [ $# -ne 2 ]
|
---|
47 | then
|
---|
48 | echo "ERROR: Wrong number of arguments: $1"
|
---|
49 | usage
|
---|
50 | exit 1
|
---|
51 | fi
|
---|
52 |
|
---|
53 |
|
---|
54 |
|
---|