From: Alessio Caiazza <nol...@abisso.org>

Currently tinc init script will delete the generated configuration
folder and then check if it will not exists in order to create it. This
patch will first check if the generated configuration folder exists and
then delete it, after that it will always create the configuration
folder.

Signed-off-by: Alessio Caiazza <nol...@abisso.org> 
---
Hello, this is my first openwrt patch, I developed it on attitude
adjustment branch for fixing the bug about the not deleted conf
directory; after reading all the patch submission guide I found it to
be already fixed in trunk. 

Anyhow the commited patch is whitespace indented in a tab indented file
and did that always-true check. So I decided to rebase my work on trunk
and submit it in order to get used to the  patch submission process.
Index: tinc.init
===================================================================
diff --git a/packages/net/tinc/files/tinc.init 
b/packages/net/tinc/files/tinc.init
--- a/packages/net/tinc/files/tinc.init (revision 36094)
+++ b/packages/net/tinc/files/tinc.init (working copy)
@@ -135,10 +135,8 @@
 
        section_enabled "$s" || return 1
 
-        # rm old config
-        rm -rf "$TMP_TINC/$s/"
-
-       [ ! -d "$TMP_TINC/$s" ] && mkdir -p "$TMP_TINC/$s"
+       [ -d "$TMP_TINC/$s" ] && rm -rf "$TMP_TINC/$s/"
+       mkdir -p "$TMP_TINC/$s"
        [ -d "/etc/tinc/$s" ] && cp -r "/etc/tinc/$s" "$TMP_TINC/"
 
        # append flags




_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to