mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-05 00:27:25 +00:00
Don't exit on missing kernel module during non-interactive scenario
This commit is contained in:
parent
c027db8bf4
commit
446aacb9b6
@ -25,9 +25,18 @@ EHDD_LUKS_NAME="c1"
|
|||||||
assert_kernel_modules() {
|
assert_kernel_modules() {
|
||||||
local check="$(lsmod | awk '$1=="dm_crypt" {print "yes"}')"
|
local check="$(lsmod | awk '$1=="dm_crypt" {print "yes"}')"
|
||||||
if [ "$check" != "yes" ]; then
|
if [ "$check" != "yes" ]; then
|
||||||
echo "Required kernel modules for encryption-at-rest are not loaded. Cannot continue"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
find_unused_loop() {
|
find_unused_loop() {
|
||||||
|
Loading…
Reference in New Issue
Block a user