sipb-xen-install deals with lvcreate, and some tweaks
[invirt/packages/invirt-autoinstaller.git] / common / usr / sbin / sipb-xen-create-image
index 997e12a..8b56ce9 100644 (file)
@@ -2,13 +2,13 @@
 # Usage: no command-line args.
 # "arguments" come in environment:
 #  TARGET a device filename
-#  IMAGESIZE the desired filesystem size in megabytes (rest will be swap)
+#  FSSIZE 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"
+echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"
 
 kpartx -a "$TARGET"    # should be no-op in guest
 
@@ -16,6 +16,6 @@ xen-create-image --image-dev "${TARGET}1" --swap-dev "${TARGET}2" --fs ext3 --id
  --hostname "$HOSTNAME" --ip="$IP" --netmask=255.255.0.0 --gateway=18.181.0.1 \
  --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes
 
-kpartx -d $VOLUME
+kpartx -d "$TARGET"
 
 exit 0