mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-05 00:27:25 +00:00
back out assert_kernel_modules
This commit is contained in:
parent
446aacb9b6
commit
0fce66dbc7
@ -44,7 +44,6 @@ if [ ! -e "$EHDD_IMG" ]; then
|
||||
echo ""
|
||||
echo "NOTE: You will need to reenter your drive encryption password"
|
||||
fi
|
||||
assert_kernel_modules
|
||||
cryptsetup luksOpen $(keyfile_option) $loop $EHDD_LUKS_NAME # map device to /dev/mapper/NAME
|
||||
mke2fs -j /dev/mapper/$EHDD_LUKS_NAME
|
||||
# sleep a brief time to avoid "device busy"
|
||||
|
@ -22,22 +22,6 @@ EHDD_IMG="$STORAGE_ROOT.HDD"
|
||||
EHDD_MOUNTPOINT="$STORAGE_ROOT"
|
||||
EHDD_LUKS_NAME="c1"
|
||||
|
||||
assert_kernel_modules() {
|
||||
local check="$(lsmod | awk '$1=="dm_crypt" {print "yes"}')"
|
||||
if [ "$check" != "yes" ]; then
|
||||
if [ ! -z "$EHDD_KEYFILE" ]; then
|
||||
echo "WARNING: Required kernel modules for encryption-at-rest are not loaded."
|
||||
# probably testing / virutalization
|
||||
echo "OUTPUT from lsmod:"
|
||||
echo "------------------------------------------------------"
|
||||
lsmod
|
||||
echo "------------------------------------------------------"
|
||||
else
|
||||
echo "Required kernel modules for encryption-at-rest are not loaded. Cannot continue."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
find_unused_loop() {
|
||||
losetup -f
|
||||
|
@ -21,7 +21,6 @@ if is_mounted; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
assert_kernel_modules
|
||||
loop=$(find_unused_loop)
|
||||
losetup $loop "$EHDD_IMG" || exit 1
|
||||
# map device to /dev/mapper/NAME
|
||||
|
Loading…
Reference in New Issue
Block a user