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

Last change on this file since 931 was 931, checked in by price, 16 years ago

first cut at on-host installer

File size: 629 bytes
RevLine 
[931]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
9export HOSTNAME="$2"
10export DIST="$3"
11export MIRROR="$4"
12export IMAGESIZE="$5"
13export IP="$6"
14
15export ARCH=amd64
16
17#LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
18
19if [ -z "$IP" ]; then
20    IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1`
21fi
22
23export TARGET=/dev/mapper/xenvg-d_$(echo "$HOSTNAME" | sed -e 's/-/--/g')_hda
24
25/usr/sbin/sipb-xen-create-image
26
Note: See TracBrowser for help on using the repository browser.