diff options
author | Sven Gothel <[email protected]> | 2021-07-08 14:19:11 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-07-08 14:19:11 +0200 |
commit | af00069429a90eabaa9b226f1af6adfe584c33f1 (patch) | |
tree | 5d6f35b1da5900128266fdeb0305512511560364 /scripts | |
parent | 8074777e2a9efbd8f36e6460b059160530fe3b42 (diff) |
mkfs.ext4: Only set reserved-blocks-percentage to zero if ROOTFS_RO is set
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/qcow2_handling | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/qcow2_handling b/scripts/qcow2_handling index 7f2316d..24ac47b 100644 --- a/scripts/qcow2_handling +++ b/scripts/qcow2_handling @@ -185,7 +185,11 @@ EOF sync kpartx -a $NBD_DEV mkfs.fat -n BOOT -F 32 -v $MAP_BOOT_DEV - mkfs.ext4 -L ROOTFS -m 0 -O "^has_journal,^metadata_csum,^64bit" $MAP_ROOT_DEV + if [ "${ROOTFS_RO}" = "1" ] ; then + mkfs.ext4 -L ROOTFS -m 0 -O "^has_journal,^metadata_csum,^64bit" $MAP_ROOT_DEV + else + mkfs.ext4 -L ROOTFS -O "^has_journal,^metadata_csum,^64bit" $MAP_ROOT_DEV + fi sync else if [ ! -f "${WORK_DIR}/image-${PREV_STAGE}.qcow2" ]; then |