From: Greg Price Date: Sun, 28 Sep 2008 23:34:10 +0000 (-0400) Subject: tweak autoinstall scripts X-Git-Tag: sipb-xen-autoinstaller/2.5~4 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-autoinstaller.git/commitdiff_plain/a6b4b67cebc34d1c7915f420e03b39f5ae4b448d?hp=ceda7741bc09af013861f1fbfbfe32a42901e58d;ds=sidebyside tweak autoinstall scripts svn path=/trunk/packages/sipb-xen-autoinstaller/; revision=937 --- diff --git a/common/usr/sbin/sipb-xen-create-image b/common/usr/sbin/sipb-xen-create-image index ffba79d..997e12a 100644 --- a/common/usr/sbin/sipb-xen-create-image +++ b/common/usr/sbin/sipb-xen-create-image @@ -1,10 +1,13 @@ #!/bin/bash # Usage: no command-line args. # "arguments" come in environment: -# TARGET a device filename, IMAGESIZE its size in XXXX what unit? +# TARGET a device filename +# IMAGESIZE the desired filesystem size in megabytes (rest will be swap) # ARCH, DIST, MIRROR # HOSTNAME, IP +set -e + echo ,"${IMAGESIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET" kpartx -a "$TARGET" # should be no-op in guest diff --git a/host/usr/sbin/sipb-xen-install b/host/usr/sbin/sipb-xen-install index b7d9c66..81cea3f 100644 --- a/host/usr/sbin/sipb-xen-install +++ b/host/usr/sbin/sipb-xen-install @@ -6,10 +6,11 @@ export PATH #WTF? +LVNAME="$1" export HOSTNAME="$2" export DIST="$3" export MIRROR="$4" -export IMAGESIZE="$5" +export IMAGESIZE="$5" # in megabytes export IP="$6" export ARCH=amd64 @@ -20,7 +21,7 @@ if [ -z "$IP" ]; then IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1` fi -export TARGET=/dev/mapper/xenvg-d_$(echo "$HOSTNAME" | sed -e 's/-/--/g')_hda +export TARGET=/dev/mapper/xenvg-$(echo "$LVNAME" | sed -e 's/-/--/g')_hda /usr/sbin/sipb-xen-create-image