summaryrefslogtreecommitdiff
path: root/export-image
diff options
context:
space:
mode:
authorRuss Kubes <russkubes@yahoo.com>2017-07-16 10:27:30 -0500
committerXECDesign <XECDesign@users.noreply.github.com>2017-07-17 11:36:43 +0200
commit4d65b2b3579a6f808df4fce1ae3bc0ffea16c071 (patch)
tree679004e736854bc02ee1a290ac762b17ea3fadeb /export-image
parent137efd2379000ae49e4c4e9122774d0dec8ceced (diff)
Export-image: Only disable metadata_csum feature if it's possibly enabled.
Diffstat (limited to 'export-image')
-rwxr-xr-xexport-image/prerun.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/export-image/prerun.sh b/export-image/prerun.sh
index a639c9c..67da3da 100755
--- a/export-image/prerun.sh
+++ b/export-image/prerun.sh
@@ -50,8 +50,12 @@ ROOT_DEV=$(losetup --show -f -o ${ROOT_OFFSET} --sizelimit ${ROOT_LENGTH} ${IMG_
echo "/boot: offset $BOOT_OFFSET, length $BOOT_LENGTH"
echo "/: offset $ROOT_OFFSET, length $ROOT_LENGTH"
+ROOT_FEATURES="^huge_file"
+if grep -q "metadata_csum" /etc/mke2fs.conf; then
+ ROOT_FEATURES="^metadata_csum,$ROOT_FEATURES"
+fi
mkdosfs -n boot -F 32 -v $BOOT_DEV > /dev/null
-mkfs.ext4 -O ^metadata_csum,^huge_file $ROOT_DEV > /dev/null
+mkfs.ext4 -O $ROOT_FEATURES $ROOT_DEV > /dev/null
mount -v $ROOT_DEV ${ROOTFS_DIR} -t ext4
mkdir -p ${ROOTFS_DIR}/boot