source: trunk/packages/sipb-xen-autoinstaller/host/usr/sbin/sipb-xen-install @ 937

Last change on this file since 937 was 937, checked in by price, 15 years ago

tweak autoinstall scripts

File size: 653 bytes
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
7export PATH #WTF?
8
9LVNAME="$1"
10export HOSTNAME="$2"
11export DIST="$3"
12export MIRROR="$4"
13export IMAGESIZE="$5"  # in megabytes
14export IP="$6"
15
16export ARCH=amd64
17
18#LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
19
20if [ -z "$IP" ]; then
21    IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1`
22fi
23
24export 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.