aboutsummaryrefslogtreecommitdiffstats
path: root/dns/radns
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2011-09-28 17:48:16 +0800
committerbapt <bapt@FreeBSD.org>2011-09-28 17:48:16 +0800
commit44b08170b0d8766264d075b878d7a15c6cf51914 (patch)
tree66dea7652ee5ddc7b14fbd4ee851e85bb28eb9b6 /dns/radns
parentd454bec67f5da5cbc9b964224b3c2bcfcf4243a9 (diff)
downloadfreebsd-ports-gnome-44b08170b0d8766264d075b878d7a15c6cf51914.tar.gz
freebsd-ports-gnome-44b08170b0d8766264d075b878d7a15c6cf51914.tar.zst
freebsd-ports-gnome-44b08170b0d8766264d075b878d7a15c6cf51914.zip
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>
Diffstat (limited to 'dns/radns')
-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
6 files changed, 140 insertions, 0 deletions
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