summaryrefslogtreecommitdiffstats
path: root/modules.d/01fips/fips-noboot.sh
blob: 319da90d8fa6e6923eb4691eaa93612816f45abc (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
    :
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