Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | # If this script is interrupted, it may not clean up after itself. |
---|
4 | # In particular, it may leave ${TARGET}1 mounted somewhere in tmp. |
---|
5 | # Unmount it, then kpartx -d $TARGET to clean up. |
---|
6 | |
---|
7 | export PATH #WTF? |
---|
8 | |
---|
9 | LVNAME="$1" |
---|
10 | export HOSTNAME="$2" |
---|
11 | export DIST="$3" |
---|
12 | export MIRROR="$4" |
---|
13 | export IMAGESIZE="$5" # in megabytes |
---|
14 | export IP="$6" |
---|
15 | |
---|
16 | export ARCH=amd64 |
---|
17 | |
---|
18 | #LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'` |
---|
19 | |
---|
20 | if [ -z "$IP" ]; then |
---|
21 | IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1` |
---|
22 | fi |
---|
23 | |
---|
24 | export TARGET=/dev/mapper/xenvg-$(echo "$LVNAME" | sed -e 's/-/--/g')_hda |
---|
25 | |
---|
26 | /usr/sbin/sipb-xen-create-image |
---|
27 | |
---|
Note: See
TracBrowser
for help on using the repository browser.