exclude .svn in builds
[invirt/packages/invirt-autoinstaller.git] / host / usr / sbin / sipb-xen-install
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 export HOSTNAME="$2"
10 export DIST="$3"
11 export MIRROR="$4"
12 export IMAGESIZE="$5"
13 export IP="$6"
14
15 export ARCH=amd64
16
17 #LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
18
19 if [ -z "$IP" ]; then
20     IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1`
21 fi
22
23 export TARGET=/dev/mapper/xenvg-d_$(echo "$HOSTNAME" | sed -e 's/-/--/g')_hda
24
25 /usr/sbin/sipb-xen-create-image
26