Merge pull request from balena-io/dont-check-for-loaded-modules

Dont check config.gz for loaded i6tables module
This commit is contained in:
CameronDiver 2019-05-18 01:25:46 -07:00 committed by GitHub
commit 1aa42b3b4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,9 +59,13 @@ fi
if [ ! -d /lib/modules ]; then
ln -s /mnt/root/lib/modules /lib/modules
fi
# Now load the ip6_tables kernel module, so we can do filtering on ipv6 addresses
if [ -z "$(cat /proc/config.gz | gunzip | grep CONFIG_IP6_NF_IPTABLES=y || true)" ]; then
modprobe ip6_tables
fi
# Now load the ip6_tables kernel module, so we can do
# filtering on ipv6 addresses. Don't fail here if the
# modprobe fails, as this can either be that the module is
# already loaded or that the kernel module isn't present. In
# the former case, this is fine for runtime, and in the
# latter it means that the supervisor will fail later on, so
# not a problem.
modprobe ip6_tables || true
exec node /usr/src/app/dist/app.js