From 55bfe4e33915156e3c68fcf0a5804cafe0e8fae6 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 2 Sep 2019 13:31:57 +0000 Subject: Fix link to module directory --- files/etc/init.d/container_init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'files/etc/init.d/container_init') diff --git a/files/etc/init.d/container_init b/files/etc/init.d/container_init index 706ebe4..b47f1c5 100755 --- a/files/etc/init.d/container_init +++ b/files/etc/init.d/container_init @@ -44,9 +44,9 @@ boot() { fi fi - for r in /lib/modules/*; do - ln -s $r /lib/modules/$(uname -r) - break + if [ ! -e /lib/modules/$(uname -r) ]; then + local modulesdir=$(basename $(dirname $(opkg files kmod-ipt-core|grep "/lib/modules/[0-9].*"|head -1))) + ln -s $modulesdir /lib/modules/$(uname -r) done exit $res } -- cgit v1.2.3