From a6b4b67cebc34d1c7915f420e03b39f5ae4b448d Mon Sep 17 00:00:00 2001 From: Greg Price Date: Sun, 28 Sep 2008 19:34:10 -0400 Subject: [PATCH] tweak autoinstall scripts svn path=/trunk/packages/sipb-xen-autoinstaller/; revision=937 --- common/usr/sbin/sipb-xen-create-image | 5 ++++- host/usr/sbin/sipb-xen-install | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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 -- 1.7.9.5