From 92e357ebd811daf440f3b7e8185207557470bf47 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Mon, 10 Jan 2022 23:56:36 +0100 Subject: [PATCH] wg-installer: fix using symlinks for conf files It is useful to symlink babeld and olsrd to /tmp/ if we frequently write to those config files. Signed-off-by: Nick Hainke (cherry picked from commit 5e8301d7dc154b27b03dc2c24c111e41bb897293) --- net/wg-installer/Makefile | 4 ++-- net/wg-installer/wg-server/hotplug.d/99-mesh-babeld | 4 ++-- net/wg-installer/wg-server/hotplug.d/99-mesh-olsrd | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/wg-installer/Makefile b/net/wg-installer/Makefile index a1c86f36fc..ce729a90b1 100644 --- a/net/wg-installer/Makefile +++ b/net/wg-installer/Makefile @@ -50,7 +50,7 @@ endef define Package/wg-installer-server-hotplug-babeld $(call Package/wg-installer-server) - DEPENDS:=wg-installer-server + DEPENDS:=wg-installer-server +coreutils-dirname +coreutils-realpath endef define Package/wg-installer-server-hotplug-babeld/install @@ -60,7 +60,7 @@ endef define Package/wg-installer-server-hotplug-olsrd $(call Package/wg-installer-server) - DEPENDS:=wg-installer-server + DEPENDS:=wg-installer-server +coreutils-dirname +coreutils-realpath endef define Package/wg-installer-server-hotplug-olsrd/install diff --git a/net/wg-installer/wg-server/hotplug.d/99-mesh-babeld b/net/wg-installer/wg-server/hotplug.d/99-mesh-babeld index 068b199a18..4da7caa914 100644 --- a/net/wg-installer/wg-server/hotplug.d/99-mesh-babeld +++ b/net/wg-installer/wg-server/hotplug.d/99-mesh-babeld @@ -14,7 +14,7 @@ fi if [ "${ACTION}" == "add" ]; then uci add babeld interface uci set babeld.@interface[-1].ifname="${INTERFACE}" - uci commit + uci -c "$(dirname $(realpath /etc/config/babeld))" commit babeld /etc/init.d/babeld reload fi @@ -26,6 +26,6 @@ if [ "${ACTION}" == "remove" ]; then fi i=$((i+1)); done - uci commit + uci -c "$(dirname $(realpath /etc/config/babeld))" commit babeld /etc/init.d/babeld reload fi diff --git a/net/wg-installer/wg-server/hotplug.d/99-mesh-olsrd b/net/wg-installer/wg-server/hotplug.d/99-mesh-olsrd index 648ef6989d..1e4be36972 100644 --- a/net/wg-installer/wg-server/hotplug.d/99-mesh-olsrd +++ b/net/wg-installer/wg-server/hotplug.d/99-mesh-olsrd @@ -16,7 +16,7 @@ if [ "${ACTION}" == "add" ]; then uci set olsrd.@Interface[-1].ignore=0 uci set olsrd.@Interface[-1].interface="${INTERFACE}" uci set olsrd.@Interface[-1].Mode="ether" - uci commit + uci -c "$(dirname $(realpath /etc/config/olsrd))" commit olsrd /etc/init.d/olsrd reload fi @@ -28,6 +28,6 @@ if [ "${ACTION}" == "remove" ]; then fi i=$((i+1)); done - uci commit + uci -c "$(dirname $(realpath /etc/config/olsrd))" commit olsrd /etc/init.d/olsrd reload fi -- 2.30.2