aboutsummaryrefslogtreecommitdiff
path: root/net/tinc
diff options
context:
space:
mode:
authorAlessio Caiazza <nolith@abisso.org>2014-08-11 12:24:27 +0200
committerSaverio Proto <zioproto@gmail.com>2014-10-03 17:51:44 +0200
commitc1195229df3fb7a088010971bfb54db4a50d97ff (patch)
treeb8ec594ecf24b67cd20ae90eeb9fae1f30ba95a2 /net/tinc
parent5c51f03557719d01c49472bf2ac91ed9cab1906c (diff)
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.
Diffstat (limited to 'net/tinc')
-rw-r--r--net/tinc/Makefile2
-rw-r--r--net/tinc/files/tinc.init6
2 files changed, 3 insertions, 5 deletions
diff --git a/net/tinc/Makefile b/net/tinc/Makefile
index 67618e32f..945ca781c 100644
--- a/net/tinc/Makefile
+++ b/net/tinc/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tinc
PKG_VERSION:=1.0.24
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages
diff --git a/net/tinc/files/tinc.init b/net/tinc/files/tinc.init
index b24bc682e..e49b35877 100644
--- a/net/tinc/files/tinc.init
+++ b/net/tinc/files/tinc.init
@@ -135,10 +135,8 @@ 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 "$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