5 #For some strange reason, . $TARGET doesn't work reliably.
6 eval `grep -a -m1 -B 100 ^return$ $TARGET | grep -v return`
11 #MIRROR=http://debian.lcs.mit.edu/debian
16 #LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
18 # If this script is interrupted, it may not clean up after itself.
19 # In particular, it may leave ${VOLUME}1 mounted somewhere in tmp.
20 # Unmount it, then kpartx -d $VOLUME to clean up.
23 ### Create the device for SIPB-Xen purposes
25 echo ,${IMAGESIZE}$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 $TARGET
28 xen-create-image --image-dev ${TARGET}1 --swap-dev ${TARGET}2 --fs ext3 --ide --arch $ARCH --dist $DIST --hostname $HOSTNAME --mirror $MIRROR --dhcp --cache=yes