#!/bin/bash

lsmod | grep -i algif_aead
if [[ "$?" -eq 0 ]]
then
	echo "Module algif_aead is loaded. Attempting to unload module"
	modprobe -r algif_aead || echo "algif_aead module couldn't be removed, try using \"modprobe -r -f algif_aead\" or reboot"
fi

# Using a here-doc gives us a permission denied error. Opting for echos instead
echo "blacklist algif_aead" > /etc/modprobe.d/10-cvs2026-31431-fix.conf
echo "install algif_aead /bin/false" >> /etc/modprobe.d/10-cvs2026-31431-fix.conf
