summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2011-09-28 09:48:16 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2011-09-28 09:48:16 +0000
commit0f3eb33db7f8390f466b429fcaf5091ab94e1f80 (patch)
treec2a09d07d3b50bca45571a6368ed523fc3571ee0 /dns
parentFix double BUILD_DEPENDS macro (diff)
Router Advertisement DNS (radns)
radns is an IPv6 DNS server address autoconfiguration client. It listens for IPv6 Router Advertisements with the Recursive DNS Server (RDNSS) and the DNS Search List (DNSSL) options and stores the search list and address(es) in a file in the same syntax as resolv.conf(5). WWW: http://hack.org/mc/hacks/radns/ PR: ports/159626 Submitted by: Michael Cardell Widerkrantz <mc@hack.org>
Notes
Notes: svn path=/head/; revision=282562
Diffstat (limited to 'dns')
-rw-r--r--dns/Makefile1
-rw-r--r--dns/radns/Makefile43
-rw-r--r--dns/radns/distinfo2
-rw-r--r--dns/radns/files/pkg-message.in13
-rw-r--r--dns/radns/files/radns.in70
-rw-r--r--dns/radns/pkg-descr8
-rw-r--r--dns/radns/pkg-plist4
7 files changed, 141 insertions, 0 deletions
diff --git a/dns/Makefile b/dns/Makefile
index 0f84a1310642..c42d7ad57564 100644
--- a/dns/Makefile
+++ b/dns/Makefile
@@ -132,6 +132,7 @@
SUBDIR += py-dnspython
SUBDIR += py-namebench
SUBDIR += py-twistedNames
+ SUBDIR += radns
SUBDIR += rbldnsd
SUBDIR += rbllookup
SUBDIR += rbllookup-ng
diff --git a/dns/radns/Makefile b/dns/radns/Makefile
new file mode 100644
index 000000000000..ddeea50fb883
--- /dev/null
+++ b/dns/radns/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: radns
+# Date created: 11 July 2011
+# Whom: Michael Cardell Widerkrantz <mc@hack.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= radns
+PORTVERSION= 20110809
+CATEGORIES= dns
+MASTER_SITES= http://hack.org/mc/hacks/radns/
+
+MAINTAINER= mc@hack.org
+COMMENT= IPv6 DNS server address autoconfiguration client
+
+LICENSE= ISCL
+
+USE_BZIP2= yes
+USE_RC_SUBR= radns
+
+USERS= radns
+GROUPS= radns
+
+USE_RC_SUBR= radns
+SUB_FILES= pkg-message
+
+MAN8= radns.8
+
+PORTDOCS= LICENSE README README.FreeBSD NEWS
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @${ECHO_MSG} "Installing additional documentation to ${DOCSDIR}"
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_MAN} ${WRKSRC}/LICENSE ${DOCSDIR}
+ @${INSTALL_MAN} ${WRKSRC}/README ${DOCSDIR}
+ @${INSTALL_MAN} ${WRKSRC}/README.FreeBSD ${DOCSDIR}
+ @${INSTALL_MAN} ${WRKSRC}/NEWS ${DOCSDIR}
+
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/dns/radns/distinfo b/dns/radns/distinfo
new file mode 100644
index 000000000000..dc9cc30c00c7
--- /dev/null
+++ b/dns/radns/distinfo
@@ -0,0 +1,2 @@
+SHA256 (radns-20110809.tar.bz2) = 1a501c40c15008f0581a4d8616e261b0b4e851a04c52cdad490bcb581c7e81dd
+SIZE (radns-20110809.tar.bz2) = 19966
diff --git a/dns/radns/files/pkg-message.in b/dns/radns/files/pkg-message.in
new file mode 100644
index 000000000000..8e6cf44d5520
--- /dev/null
+++ b/dns/radns/files/pkg-message.in
@@ -0,0 +1,13 @@
+****************************************************
+
+To enable radns, edit /etc/rc.conf and add:
+
+ radns_enable="YES"
+
+radns won't touch your system's /etc/resolv.conf. It will write to its
+own file %%PREFIX%%/etc/radns/radns-resolv.conf.
+
+To make sure the system's /etc/resolv.conf file is created from all
+sources, read %%PREFIX%%/share/doc/radns/README.FreeBSD.
+
+****************************************************
diff --git a/dns/radns/files/radns.in b/dns/radns/files/radns.in
new file mode 100644
index 000000000000..81d31496c68f
--- /dev/null
+++ b/dns/radns/files/radns.in
@@ -0,0 +1,70 @@
+#! /bin/sh
+#
+# PROVIDE: radns
+# REQUIRE: DAEMON LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable radns:
+#
+# radns_enable (bool): Set it to "YES" to enable radns
+# Default is "NO".
+# radns_resolv (path): Full path to radns' own resolv.conf
+# radns_pidfile (path): Full path to pid file.
+# radns_script (path): Full path to script file or empty string if no script.
+# radns_username (user): Username the daemon will run as.
+#
+
+. /etc/rc.subr
+
+name=radns
+rcvar=`set_rcvar`
+radns_dir="%%PREFIX%%/etc/radns"
+
+load_rc_config $name
+
+# Default values
+: ${radns_enable="NO"}
+: ${radns_pidfile="/var/run/${name}.pid"}
+: ${radns_resolv="${radns_dir}/radns-resolv.conf"}
+: ${radns_script=""}
+: ${radns_username="radns"}
+
+command="%%PREFIX%%/bin/${name}"
+
+start_precmd=start_precmd
+stop_postcmd=stop_postcmd
+
+start_precmd()
+{
+ [ -d ${radns_dir} ] || mkdir ${radns_dir}
+ chown ${radns_username} ${radns_dir}
+}
+
+stop_postcmd()
+{
+ rm -f ${radns_resolv}
+ rm -f ${radns_pidfile}
+}
+
+# if script:
+if [ x${radns_script} != "x" ]
+then
+ command_args="-f ${radns_resolv} -s ${radns_script} -u ${radns_username} \
+ -p ${radns_pidfile}"
+else
+ command_args="-f ${radns_resolv} -u ${radns_username} -p ${radns_pidfile}"
+fi
+
+reload_precmd()
+{
+ echo "Stopping ${name} and start gracefully."
+}
+
+reload_postcmd()
+{
+ rm -f ${radns_pidfile}
+ run_rc_command start
+}
+
+# actually execute the program
+run_rc_command "$1"
diff --git a/dns/radns/pkg-descr b/dns/radns/pkg-descr
new file mode 100644
index 000000000000..05b0c4ca4e75
--- /dev/null
+++ b/dns/radns/pkg-descr
@@ -0,0 +1,8 @@
+Router Advertisement DNS (radns)
+
+radns is an IPv6 DNS server address autoconfiguration client. It
+listens for IPv6 Router Advertisements with the Recursive DNS Server
+(RDNSS) and the DNS Search List (DNSSL) options and stores the search
+list and address(es) in a file in the same syntax as resolv.conf(5).
+
+WWW: http://hack.org/mc/hacks/radns/
diff --git a/dns/radns/pkg-plist b/dns/radns/pkg-plist
new file mode 100644
index 000000000000..87c416aec667
--- /dev/null
+++ b/dns/radns/pkg-plist
@@ -0,0 +1,4 @@
+bin/radns
+etc/radns/dhclient-exit-hooks
+etc/radns/radns-script
+@dirrm etc/radns