summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroy <roy>2008-12-16 14:57:58 +0000
committerroy <roy>2008-12-16 14:57:58 +0000
commitdc0ce96674aae96cf190cf7cc8716acb87dce156 (patch)
tree9030244bc20fba55e54b242e44e6c17ecad388de
parent96e1afd8ed9e771ade0f56c8b3931898c5ce2de2 (diff)
downloadpkgsrc-dc0ce96674aae96cf190cf7cc8716acb87dce156.tar.gz
/etc/resolv.conf is a file that holds the configuration for the local
resolution of domain names. Normally this file is either static or maintained by a local daemon, normally a DHCP daemon. But what happens if more than one thing wants to control the file? Say you have wired and wireless interfaces to different subnets and run a VPN or two on top of that, how do you say which one controls the file? It's also not as easy as just adding and removing the nameservers each client knows about as different clients could add the same nameservers. Enter resolvconf, the middleman between the network configuration services and /etc/resolv.conf. resolvconf itself is just a script that stores, removes and lists a full resolv.conf generated for the interface. It then calls all the helper scripts it knows about so it can configure the real /etc/resolv.conf and optionally any local nameservers other can libc.
-rw-r--r--net/openresolv/DESCR14
-rw-r--r--net/openresolv/MESSAGE4
-rw-r--r--net/openresolv/Makefile34
-rw-r--r--net/openresolv/PLIST10
-rw-r--r--net/openresolv/distinfo5
5 files changed, 67 insertions, 0 deletions
diff --git a/net/openresolv/DESCR b/net/openresolv/DESCR
new file mode 100644
index 00000000000..ca9f04496da
--- /dev/null
+++ b/net/openresolv/DESCR
@@ -0,0 +1,14 @@
+/etc/resolv.conf is a file that holds the configuration for the local
+resolution of domain names. Normally this file is either static or maintained
+by a local daemon, normally a DHCP daemon. But what happens if more than one
+thing wants to control the file? Say you have wired and wireless interfaces to
+different subnets and run a VPN or two on top of that, how do you say which one
+controls the file? It's also not as easy as just adding and removing the
+nameservers each client knows about as different clients could add the same
+nameservers.
+
+Enter resolvconf, the middleman between the network configuration services and
+/etc/resolv.conf. resolvconf itself is just a script that stores, removes and
+lists a full resolv.conf generated for the interface. It then calls all the
+helper scripts it knows about so it can configure the real /etc/resolv.conf
+and optionally any local nameservers other can libc.
diff --git a/net/openresolv/MESSAGE b/net/openresolv/MESSAGE
new file mode 100644
index 00000000000..2034a252ce2
--- /dev/null
+++ b/net/openresolv/MESSAGE
@@ -0,0 +1,4 @@
+To ensure that resolvconf works correctly, you should ensure that
+${PREFIX} is available before any clients such as dhcpcd attempt to use it.
+On NetBSD, for example, you could do this by setting this in /etc/rc.conf
+critical_filesystems_local="/usr /var"
diff --git a/net/openresolv/Makefile b/net/openresolv/Makefile
new file mode 100644
index 00000000000..3391c660a56
--- /dev/null
+++ b/net/openresolv/Makefile
@@ -0,0 +1,34 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/12/16 14:57:58 roy Exp $
+#
+
+DISTNAME= openresolv-2.0
+CATEGORIES= net
+MASTER_SITES= ftp://roy.marples.name/pub/openresolv/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= roy@marples.name
+HOMEPAGE= http://roy.marples.name/projects/openresolv/
+COMMENT= Framework for managing /etc/resolv.conf
+
+USE_LANGUAGES= # none
+
+PKG_DESTDIR_SUPPORT= user-destdir
+PKG_SYSCONFSUBDIR= resolvconf
+EGDIR= ${PREFIX}/share/examples/resolvconf
+
+MAKE_ENV+= MANDIR=${PREFIX}/${PKGMANDIR} \
+ SYSCONFDIR=${PKG_SYSCONFDIR}
+INSTALL_MAKE_FLAGS+= SYSCONFDIR=${EGDIR}
+
+OWN_DIRS= ${PKG_SYSCONFDIR}/update.d
+OWN_DIRS+= ${PKG_SYSCONFDIR}/resolv.conf.d
+CONF_FILES= ${EGDIR}/resolv.conf.d/head \
+ ${PKG_SYSCONFDIR}/resolv.conf.d/head
+
+CONF_FILES_PERMS=
+.for s in libc dnsmasq named
+CONF_FILES_PERMS+= ${EGDIR}/update.d/${s} ${PKG_SYSCONFDIR}/update.d/${s} \
+ ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
+.endfor
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/openresolv/PLIST b/net/openresolv/PLIST
new file mode 100644
index 00000000000..835ee2ad32e
--- /dev/null
+++ b/net/openresolv/PLIST
@@ -0,0 +1,10 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/12/16 14:57:58 roy Exp $
+man/man8/resolvconf.8
+sbin/resolvconf
+share/examples/resolvconf/resolv.conf.d/head
+share/examples/resolvconf/update.d/dnsmasq
+share/examples/resolvconf/update.d/libc
+share/examples/resolvconf/update.d/named
+@dirrm share/examples/resolvconf/resolv.conf.d
+@dirrm share/examples/resolvconf/update.d
+@dirrm share/examples/resolvconf
diff --git a/net/openresolv/distinfo b/net/openresolv/distinfo
new file mode 100644
index 00000000000..52a5ed9d2aa
--- /dev/null
+++ b/net/openresolv/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/12/16 14:57:58 roy Exp $
+
+SHA1 (openresolv-2.0.tar.bz2) = 91cbbcae79686ae2b661e8e2dcf461809e9e200e
+RMD160 (openresolv-2.0.tar.bz2) = fdac1ae91c6ee5e36ae809570aae3d3310124b30
+Size (openresolv-2.0.tar.bz2) = 9211 bytes