Browse Source

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 <drew.moseley@northern.tech>
2.3.x
Drew Moseley 4 years ago
parent
commit
57053296b7
  1. 4
      mender-convert-modify

4
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

Loading…
Cancel
Save