blob: f816b80c3db96e1ef779d7216ad78456b2f972e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/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 [ "$(cat /proc/sys/crypto/fips_enabled 2>/dev/null)" = "1" ] ; then
echo "Kernel running in FIPS mode."
fi
if [ -f /etc/os-release ] ; then
source /etc/os-release
echo "$PRETTY_NAME ($NAME) $VERSION"
fi
echo "Memory"
free -m
pversion cryptsetup
pversion veritysetup
pversion integritysetup
[ -x $CRYPTSETUP_PATH/cryptsetup ] && {
echo -e "Cryptsetup defaults:"
$CRYPTSETUP_PATH/cryptsetup --help | sed -n '/optional key file for/,$p' | tail -n +3
}
[ $(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
|