From 57053296b776139c79add13859176d49c284f086 Mon Sep 17 00:00:00 2001 From: Drew Moseley Date: Tue, 8 Dec 2020 15:36:06 -0500 Subject: [PATCH] Better parameter checks for read-only options. The current checks will not work when multiple options are used. Ignore the '-O ' and check only for the option values. Changelog: None Signed-off-by: Drew Moseley --- mender-convert-modify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mender-convert-modify b/mender-convert-modify index 198ab45..68378cc 100755 --- a/mender-convert-modify +++ b/mender-convert-modify @@ -294,10 +294,10 @@ if [ "${MENDER_DATA_PART_GROWFS}" == "y" ]; then fi if echo ${MENDER_ROOT_PART_FSTAB_OPTS} | tr ',' '\n' | egrep -q "^ro$"; then - if ! echo "${MENDER_ROOT_PART_MKFS_OPTS}" | fgrep -q -- "-O ^64bit"; then + if ! echo "${MENDER_ROOT_PART_MKFS_OPTS}" | fgrep -q -- "^64bit"; then log_warn "EXT4 64bits feature is known to create unstable checksums on read-only file systems, add \"-O ^64bit\" to MENDER_ROOT_PART_MKFS_OPTS to remove it" fi - if ! echo "${MENDER_ROOT_PART_MKFS_OPTS}" | fgrep -q -- "-O ^has_journal"; then + if ! echo "${MENDER_ROOT_PART_MKFS_OPTS}" | fgrep -q -- "^has_journal"; then log_warn "EXT4 journal feature is known to create unstable checksums on read-only file systems, add \"-O ^has_journal\" to MENDER_ROOT_PART_MKFS_OPTS to remove it" fi fi