]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Fix boot with `fips` without a value
authorJiri Konecny <jkonecny@redhat.com>
Thu, 4 Apr 2019 11:10:22 +0000 (13:10 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 25 Oct 2019 09:47:04 +0000 (11:47 +0200)
If you boot system with `fips` and not `fips=1` then you will get unary
operator expected error. This will fix this problem.

modules.d/01fips/fips-boot.sh
modules.d/01fips/fips-noboot.sh

index 595e49e745b7a1d9c88b4858c941589654b4ed5c..5d0bd0cb0750100cb0a9509646e13a0edccf41cb 100755 (executable)
@@ -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
index d96070622c87a08adbbf11336218b46cc71655a5..868e641b330d7c081f89fea981f6c80700df1ba6 100755 (executable)
@@ -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