summaryrefslogtreecommitdiffstats
path: root/modules.d/01fips/fips-noboot.sh
blob: 963a034d6a618f28c6948a4c2273975eae5bd39a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh

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
    fips_info "fips-noboot: start"
    mount_boot
    do_fips || die "FIPS integrity test failed"
    fips_info "fips-noboot: done!"
fi