From 844093f130f34ccd188224b024cd6e79d80a1c9d Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sun, 7 Jul 2019 14:02:31 +0200 Subject: [PATCH] Tinc: copy resolv.conf on startup. closes https://github.com/opnsense/plugins/issues/1390 --- security/tinc/Makefile | 2 +- security/tinc/src/opnsense/scripts/OPNsense/Tinc/tincd.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/security/tinc/Makefile b/security/tinc/Makefile index ed3e2d27a7..56f55d65a3 100644 --- a/security/tinc/Makefile +++ b/security/tinc/Makefile @@ -1,6 +1,6 @@ PLUGIN_NAME= tinc PLUGIN_VERSION= 1.4 -PLUGIN_REVISION= 3 +PLUGIN_REVISION= 4 PLUGIN_COMMENT= Tinc VPN PLUGIN_DEPENDS= tinc PLUGIN_MAINTAINER= ad@opnsense.org diff --git a/security/tinc/src/opnsense/scripts/OPNsense/Tinc/tincd.py b/security/tinc/src/opnsense/scripts/OPNsense/Tinc/tincd.py index 30676c173a..43d1097db9 100755 --- a/security/tinc/src/opnsense/scripts/OPNsense/Tinc/tincd.py +++ b/security/tinc/src/opnsense/scripts/OPNsense/Tinc/tincd.py @@ -80,6 +80,8 @@ def deploy(config_filename): # dump private key tmp = network.privkey() write_file(tmp['filename'], tmp['content']) + with open('/etc/resolv.conf') as fin: + write_file("%s/etc/resolv.conf" % network.get_basepath(), fin.read()) # write tinc-up file if_up = list()