From: Jiri Konecny Date: Thu, 4 Apr 2019 11:10:22 +0000 (+0200) Subject: Fix boot with `fips` without a value X-Git-Tag: 050~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ff0fcb723c544fcb360512898f799cfe9adeea8;p=thirdparty%2Fdracut.git Fix boot with `fips` without a value If you boot system with `fips` and not `fips=1` then you will get unary operator expected error. This will fix this problem. --- diff --git a/modules.d/01fips/fips-boot.sh b/modules.d/01fips/fips-boot.sh index 595e49e74..5d0bd0cb0 100755 --- a/modules.d/01fips/fips-boot.sh +++ b/modules.d/01fips/fips-boot.sh @@ -1,6 +1,6 @@ #!/bin/sh -if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then +if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1 elif getarg boot= >/dev/null; then . /sbin/fips.sh diff --git a/modules.d/01fips/fips-noboot.sh b/modules.d/01fips/fips-noboot.sh index d96070622..868e641b3 100755 --- a/modules.d/01fips/fips-noboot.sh +++ b/modules.d/01fips/fips-noboot.sh @@ -1,6 +1,6 @@ #!/bin/sh -if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then +if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1 elif ! [ -f /tmp/fipsdone ]; then . /sbin/fips.sh