Files
cryptsetup/tests/00modules-test
2019-03-21 15:32:22 +01:00

43 lines
730 B
Bash
Executable File

#!/bin/bash
[ -z "$CRYPTSETUP_PATH" ] && CRYPTSETUP_PATH=".."
function pversion() {
if [ ! -x $CRYPTSETUP_PATH/$1 ] ; then
return
fi
echo -n "$CRYPTSETUP_PATH/"
$CRYPTSETUP_PATH/$1 --version
}
echo "Cryptsetup test environment ($(date))"
uname -a
if [ -f /etc/os-release ] ; then
source /etc/os-release
echo "$PRETTY_NAME ($NAME) $VERSION"
fi
echo "Memory"
free -h
pversion cryptsetup
pversion veritysetup
pversion integritysetup
pversion cryptsetup-reencrypt
[ $(id -u) != 0 ] && exit 77
modprobe dm-crypt >/dev/null 2>&1
modprobe dm-verity >/dev/null 2>&1
modprobe dm-integrity >/dev/null 2>&1
modprobe dm-zero >/dev/null 2>&1
dmsetup version
echo "Device mapper targets:"
dmsetup targets
exit 0