X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-autoinstaller.git/blobdiff_plain/b0ebf462b826d3ea53afd1930279599d0bfb0fc6:/host/usr/sbin/sipb-xen-install..d866fd5780e3af6924c9fad312b20a8062850274:/host/usr/sbin/git-favicon.png diff --git a/host/usr/sbin/sipb-xen-install b/host/usr/sbin/sipb-xen-install deleted file mode 100644 index e17e1f7..0000000 --- a/host/usr/sbin/sipb-xen-install +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# If this script is interrupted, it may not clean up after itself. -# In particular, it may leave ${TARGET}1 mounted somewhere in tmp. -# Unmount it, then kpartx -d $TARGET to clean up. - -set -e - -export PATH #WTF? - -NAME="$1" -export HOSTNAME="$2" -export DIST="$3" -export MIRROR="$4" -export FSSIZE="$5" # in megabytes -SWAPSIZE="$6" # in megabytes -export IP="$7" - -export ARCH=amd64 -VGNAME=xenvg - -#LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'` - -if [ -z "$IP" ]; then - IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1` -fi - -/sbin/lvcreate -L $(($FSSIZE+$SWAPSIZE))M -n "${NAME}_hda" $VGNAME - -export TARGET=/dev/mapper/xenvg-"$(echo "${NAME}_hda" | sed -e 's/-/--/g')" - -/usr/sbin/sipb-xen-create-image - -echo "disk = ['phy:$VGNAME/${NAME}_hda,hda,w']" >>/etc/xen/$HOSTNAME.cfg -echo "root = '/dev/hda1 ro'" >>/etc/xen/$HOSTNAME.cfg