This variable will be used to decide if and how to partition the
instance block device.
Reviewed-by: iustinp
: ${EXTRA_PKGS:=""}
: ${GENERATE_CACHE:="yes"}
: ${CLEAN_CACHE:="14"} # number of days to keep a cache file
+: ${PARTITION_STYLE:="none"} # disk partition style
CACHE_DIR="@localstatedir@/cache/ganeti-instance-debootstrap"
CLEANUP+=("losetup -d $blockdev")
fi
+if [ "$PARTITION_STYLE" != "none" ]; then
+ echo "Unknown partition style $PARTITION_STYLE"
+ exit 1
+fi
+
mke2fs -Fjq $blockdev
root_uuid=$($VOL_ID -u $blockdev )
if [ -n "$swapdev" ]; then
# clean the cache; the default is 14 (two weeks); to disable cache
# cleaning, set it to an empty value ("")
CLEAN_CACHE="14"
+
+# PARTITION_STYLE: whether and how the target device should be partitioned.
+# Allowed values:
+# 'none': just format the device, but don't partition it
+# 'msdos': install an msdos partition table on the device, with a single
+# partition on it
+# (more styles may be added in the future)
+PARTITION_STYLE="none"