test_syntax_error 'OWNER+="0"' "OWNER key takes '=' or ':=' operator, assuming '='."
# numeric system UID is valid even if it does not exist
SYS_UID_MAX=999
-if command userdbctl >/dev/null; then
+if command -v userdbctl >/dev/null; then
# For the case if non-default setting is used. E.g. OpenSUSE uses 499.
SYS_UID_MAX="$(userdbctl user -S --no-legend --no-pager | grep 'end system' | awk '{print $8}')"
echo "SYS_UID_MAX=$SYS_UID_MAX acquired from userdbctl"
test_syntax_error 'GROUP+="0"' "GROUP key takes '=' or ':=' operator, assuming '='."
# numeric system GID is valid even if it does not exist
SYS_GID_MAX=999
-if command userdbctl >/dev/null; then
+if command -v userdbctl >/dev/null; then
# For the case if non-default setting is used. E.g. OpenSUSE uses 499.
SYS_GID_MAX="$(userdbctl group -S --no-legend --no-pager | grep 'end system' | awk '{print $8}')"
echo "SYS_GID_MAX=$SYS_GID_MAX acquired from userdbctl"
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
-if ! command knotc >/dev/null; then
+if ! command -v knotc >/dev/null; then
echo "command knotc not found, skipping..." | tee --append /skipped
exit 77
fi