Merge pull request #924 from balena-io/only-modprobe-ip6tables-if-needed

Only modprobe ip6_tables if it's necessary
This commit is contained in:
Pablo Carranza Vélez 2019-03-28 11:36:52 -07:00 committed by GitHub
commit 0f943dba1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,8 @@ 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
modprobe ip6_tables
if [ -z "$(cat /proc/config.gz | gunzip | grep CONFIG_IP6_NF_IPTABLES=y || true)" ]; then
modprobe ip6_tables
fi
exec node /usr/src/app/dist/app.js