]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Support only fips=1 not fips
authorJiri Konecny <jkonecny@redhat.com>
Thu, 4 Apr 2019 13:31:18 +0000 (15:31 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 25 Oct 2019 09:47:04 +0000 (11:47 +0200)
It looks like only the 'fips=1' is really supported and it is working
correctly. So instead of failing on 'fips' not clear way give user
information why we are failing.

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

index 5d0bd0cb0750100cb0a9509646e13a0edccf41cb..1676a6e307232eec7ba0d5ed30603b09dc406a24 100755 (executable)
@@ -2,6 +2,8 @@
 
 if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then
     rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
+elif [ -z "$fipsmode" ]; then
+    die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
 elif getarg boot= >/dev/null; then
     . /sbin/fips.sh
     if mount_boot; then
index 868e641b330d7c081f89fea981f6c80700df1ba6..8d6037e5ca496fe156e9cb69a15b3f1ed5fc2071 100755 (executable)
@@ -2,6 +2,8 @@
 
 if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then
     rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
+elif [ -z "$fipsmode" ]; then
+    die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
 elif ! [ -f /tmp/fipsdone ]; then
     . /sbin/fips.sh
     mount_boot