From: Saverio Proto Date: Tue, 8 Jan 2013 18:56:32 +0000 (+0000) Subject: [packages] tinc: The initscript for tinc writes a temporary config into /tmp/tinc. X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=cc0bfc4207da45aac10163129173e3e14759c9f5 [packages] tinc: The initscript for tinc writes a temporary config into /tmp/tinc. In the prepare_net function it appends flags and params from the uci config to the temporary tinc.conf for each net. These values are appended to the config file on each /etc/init.d/tinc restart and the file grows. By removing all old temporary config this problem is solved. Then we should also remove the temporary config for a net which is stopped to free up some bytes in memory. Contribution from Manuel Munz SVN-Revision: 35053 --- diff --git a/net/tinc/files/tinc.init b/net/tinc/files/tinc.init index 55a86a1d70..9ab1bd00c4 100644 --- a/net/tinc/files/tinc.init +++ b/net/tinc/files/tinc.init @@ -135,6 +135,9 @@ prepare_net() { section_enabled "$s" || return 1 + # rm old config + rm -rf "$TMP_TINC/$s/" + [ ! -d "$TMP_TINC/$s" ] && mkdir -p "$TMP_TINC/$s" [ -d "/etc/tinc/$s" ] && cp -r "/etc/tinc/$s" "$TMP_TINC/" @@ -179,6 +182,8 @@ stop_instance() { SERVICE_PID_FILE="/var/run/tinc.$s.pid" service_stop $BIN + # rm old config + rm -rf "$TMP_TINC/$s/" } reload_instance() {