octavia/elements/amphora-fips/post-install.d/10-enable-fips

23 lines
412 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
case $DISTRO_NAME in
ubuntu | debian )
echo "ERROR: $DISTRO_NAME is not supported for FIPS mode."
exit 1
;;
fedora | centos* | rhel* )
update-crypto-policies --no-reload --set FIPS
;;
*)
echo "ERROR: Unsupported distribution $DISTRO_NAME"
exit 1
;;
esac