Don't mount /lib/modules if it is already mounted

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-02-14 13:49:03 +00:00
parent adc8ef231e
commit fae2548f27
No known key found for this signature in database
GPG Key ID: 49690ED87032539F

View File

@ -48,7 +48,9 @@ fi
# Mount the host kernel module path onto the expected location # Mount the host kernel module path onto the expected location
# We need to do this as busybox doesn't support using a custom location # We need to do this as busybox doesn't support using a custom location
ln -s /mnt/root/lib/modules /lib/modules 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 # Now load the ip6_tables kernel module, so we can do filtering on ipv6 addresses
modprobe ip6_tables modprobe ip6_tables