Die if IPV6 module is not loaded

This commit is contained in:
Matt C 2021-11-07 19:20:46 -05:00 committed by GitHub
parent 6103c75c94
commit 6a38dbd3d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

7
buster
View file

@ -1,6 +1,6 @@
#!/bin/bash
# Copyright (C) 2015-2020 YunoHost
# Copyright (C) 2015-2021 YunoHost
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -234,6 +234,11 @@ function check_assertions()
# Assert systemd is installed
command -v systemctl > /dev/null || die "YunoHost requires systemd to be installed."
if [[ $(cat /sys/module/ipv6/parameters/disable) == "1" ]];
then
die "The package 'redis-server' will fail to install without IPV6 enabled."
fi
# Check that kernel is >= 3.12, otherwise systemd won't work properly. Cf. https://github.com/systemd/systemd/issues/5236#issuecomment-277779394
dpkg --compare-versions "$(uname -r)" "ge" "3.12" || die "YunoHost requires a kernel >= 3.12. Please consult your hardware documentation or VPS provider to learn how to upgrade your kernel."