Add resolvd(8) support to vpnc-scripts
While here take MAINTAINER as requested. Suggestions from sthen@ OK previous MAINTAINER bket@
This commit is contained in:
parent
187af626fe
commit
dd96b887ae
@ -1,16 +1,17 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2020/08/16 11:36:07 bket Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2021/10/30 19:20:49 afresh1 Exp $
|
||||
|
||||
COMMENT= connect scripts for use with vpnc and openconnect
|
||||
|
||||
C= e6a8fac7f7e8bf3c391787a3e0672f741603a9c9
|
||||
DISTNAME= vpnc-scripts-${C}
|
||||
PKGNAME= vpnc-scripts-20200317
|
||||
REVISION= 0
|
||||
|
||||
CATEGORIES= net
|
||||
|
||||
HOMEPAGE= https://gitlab.com/openconnect/vpnc-scripts/
|
||||
|
||||
MAINTAINER= Bjorn Ketelaars <bket@openbsd.org>
|
||||
MAINTAINER= Andrew Hewus Fresh <afresh1@openbsd.org>
|
||||
|
||||
# GPLv2+
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
32
net/vpnc-scripts/patches/patch-vpnc-script
Normal file
32
net/vpnc-scripts/patches/patch-vpnc-script
Normal file
@ -0,0 +1,32 @@
|
||||
$OpenBSD: patch-vpnc-script,v 1.1 2021/10/30 19:20:49 afresh1 Exp $
|
||||
|
||||
Index: vpnc-script
|
||||
--- vpnc-script.orig
|
||||
+++ vpnc-script
|
||||
@@ -150,6 +150,9 @@ elif [ -x /sbin/modify_resolvconf ]; then
|
||||
elif [ -x /usr/sbin/unbound-control ] && /usr/sbin/unbound-control status > /dev/null 2>&1; then
|
||||
MODIFYRESOLVCONF=modify_resolvconf_unbound
|
||||
RESTORERESOLVCONF=restore_resolvconf_unbound
|
||||
+elif [ -x /usr/sbin/rcctl ] && /usr/sbin/rcctl check resolvd >/dev/null; then
|
||||
+ MODIFYRESOLVCONF=modify_resolvconf_resolvd
|
||||
+ RESTORERESOLVCONF=restore_resolvconf_resolvd
|
||||
else # Generic for any OS
|
||||
MODIFYRESOLVCONF=modify_resolvconf_generic
|
||||
RESTORERESOLVCONF=restore_resolvconf_generic
|
||||
@@ -768,6 +771,16 @@ restore_resolvconf_unbound() {
|
||||
/usr/sbin/unbound-control flush_zone ${CISCO_DEF_DOMAIN}
|
||||
/usr/sbin/unbound-control flush_requestlist
|
||||
fi
|
||||
+}
|
||||
+
|
||||
+# === resolv.conf handling via resolvd =========
|
||||
+
|
||||
+modify_resolvconf_resolvd() {
|
||||
+ /sbin/route nameserver $TUNDEV $INTERNAL_IP4_DNS $INTERNAL_IP6_DNS
|
||||
+}
|
||||
+
|
||||
+restore_resolvconf_resolvd() {
|
||||
+ /sbin/route nameserver $TUNDEV
|
||||
}
|
||||
|
||||
# ========= Toplevel state handling =======================================
|
Loading…
Reference in New Issue
Block a user