Browse Source

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 <vincent@systemli.org>
lilik-openwrt-22.03
Nick Hainke 3 years ago
parent
commit
5e8301d7dc
3 changed files with 6 additions and 6 deletions
  1. +2
    -2
      net/wg-installer/Makefile
  2. +2
    -2
      net/wg-installer/wg-server/hotplug.d/99-mesh-babeld
  3. +2
    -2
      net/wg-installer/wg-server/hotplug.d/99-mesh-olsrd

+ 2
- 2
net/wg-installer/Makefile View File

@ -54,7 +54,7 @@ endef
define Package/wg-installer-server-hotplug-babeld define Package/wg-installer-server-hotplug-babeld
$(call Package/wg-installer-server) $(call Package/wg-installer-server)
DEPENDS:=wg-installer-server
DEPENDS:=wg-installer-server +coreutils-dirname +coreutils-realpath
endef endef
define Package/wg-installer-server-hotplug-babeld/install define Package/wg-installer-server-hotplug-babeld/install
@ -64,7 +64,7 @@ endef
define Package/wg-installer-server-hotplug-olsrd define Package/wg-installer-server-hotplug-olsrd
$(call Package/wg-installer-server) $(call Package/wg-installer-server)
DEPENDS:=wg-installer-server
DEPENDS:=wg-installer-server +coreutils-dirname +coreutils-realpath
endef endef
define Package/wg-installer-server-hotplug-olsrd/install define Package/wg-installer-server-hotplug-olsrd/install


+ 2
- 2
net/wg-installer/wg-server/hotplug.d/99-mesh-babeld View File

@ -14,7 +14,7 @@ fi
if [ "${ACTION}" == "add" ]; then if [ "${ACTION}" == "add" ]; then
uci add babeld interface uci add babeld interface
uci set babeld.@interface[-1].ifname="${INTERFACE}" uci set babeld.@interface[-1].ifname="${INTERFACE}"
uci commit
uci -c "$(dirname $(realpath /etc/config/babeld))" commit babeld
/etc/init.d/babeld reload /etc/init.d/babeld reload
fi fi
@ -26,6 +26,6 @@ if [ "${ACTION}" == "remove" ]; then
fi fi
i=$((i+1)); i=$((i+1));
done done
uci commit
uci -c "$(dirname $(realpath /etc/config/babeld))" commit babeld
/etc/init.d/babeld reload /etc/init.d/babeld reload
fi fi

+ 2
- 2
net/wg-installer/wg-server/hotplug.d/99-mesh-olsrd View File

@ -16,7 +16,7 @@ if [ "${ACTION}" == "add" ]; then
uci set olsrd.@Interface[-1].ignore=0 uci set olsrd.@Interface[-1].ignore=0
uci set olsrd.@Interface[-1].interface="${INTERFACE}" uci set olsrd.@Interface[-1].interface="${INTERFACE}"
uci set olsrd.@Interface[-1].Mode="ether" uci set olsrd.@Interface[-1].Mode="ether"
uci commit
uci -c "$(dirname $(realpath /etc/config/olsrd))" commit olsrd
/etc/init.d/olsrd reload /etc/init.d/olsrd reload
fi fi
@ -28,6 +28,6 @@ if [ "${ACTION}" == "remove" ]; then
fi fi
i=$((i+1)); i=$((i+1));
done done
uci commit
uci -c "$(dirname $(realpath /etc/config/olsrd))" commit olsrd
/etc/init.d/olsrd reload /etc/init.d/olsrd reload
fi fi

Loading…
Cancel
Save