summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2000-12-24 06:32:32 +0000
committerDaniel Robbins <drobbins@gentoo.org>2000-12-24 06:32:32 +0000
commit183e45d7fa30f93c432cf576bf3ed2f0e6816b53 (patch)
tree3f3edf64b4d386bffdddb0aca7100a8dcea04444 /net-misc
parentconversion from /etc/svc.d to /etc/supervise and /var/supervise (diff)
downloadhistorical-183e45d7fa30f93c432cf576bf3ed2f0e6816b53.tar.gz
historical-183e45d7fa30f93c432cf576bf3ed2f0e6816b53.tar.bz2
historical-183e45d7fa30f93c432cf576bf3ed2f0e6816b53.zip
new excellent DNS package
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/djbdns/djbdns-1.02.ebuild42
-rw-r--r--net-misc/djbdns/files/digest-djbdns-1.021
-rwxr-xr-xnet-misc/djbdns/files/dnscache71
3 files changed, 114 insertions, 0 deletions
diff --git a/net-misc/djbdns/djbdns-1.02.ebuild b/net-misc/djbdns/djbdns-1.02.ebuild
new file mode 100644
index 000000000000..59dcd5e31a67
--- /dev/null
+++ b/net-misc/djbdns/djbdns-1.02.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-misc/djbdns/djbdns-1.02.ebuild,v 1.1 2000/12/24 06:32:27 drobbins Exp $
+
+A=${P}.tar.gz
+S=${WORKDIR}/${P}
+DESCRIPTION="Excellent high-performance DNS services"
+SRC_URI="http://cr.yp.to/djbdns/${A}"
+HOMEPAGE="http://cr.yp.to/djbdns.html"
+
+DEPEND=">=sys-libs/glibc-2.1.3 >=sys-apps/daemontools-0.70"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ echo "gcc ${CFLAGS}" > conf-cc
+ echo "gcc" > conf-ld
+ echo "/usr" > /conf-home
+}
+
+src_compile() {
+ cd ${S}
+ try pmake
+}
+
+src_install() {
+ cd ${S}
+ into /usr
+ for i in *-conf dnscache tinydns walldns rbldns pickdns axfrdns *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx dnsfilter random-ip dnsqr dnsq dnstrace
+ do
+ dobin $i
+ done
+ insinto /etc
+ doins dnsroots.global
+ dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION
+ exeinto /etc/rc.d/init.d
+ doexe ${FILESDIR}/dnscache
+}
+
+
+
diff --git a/net-misc/djbdns/files/digest-djbdns-1.02 b/net-misc/djbdns/files/digest-djbdns-1.02
new file mode 100644
index 000000000000..cff8fac46b0b
--- /dev/null
+++ b/net-misc/djbdns/files/digest-djbdns-1.02
@@ -0,0 +1 @@
+MD5 c27b7ffd4af1c93db96f40f6d5f793b6 djbdns-1.02.tar.gz
diff --git a/net-misc/djbdns/files/dnscache b/net-misc/djbdns/files/dnscache
new file mode 100755
index 000000000000..d2e7656bcdee
--- /dev/null
+++ b/net-misc/djbdns/files/dnscache
@@ -0,0 +1,71 @@
+#!/bin/sh
+#RCUPDATE:3 4:80:This line is required for script management
+
+. /etc/rc.d/config/basic
+. /etc/rc.d/config/functions
+
+SERVICE=`basename ${0}`
+SVCDIR=/var/supervise/${SERVICE}
+CTLDIR=/etc/supervise/${SERVICE}
+opts="setup start stop"
+
+#this service is designed to *only* run supervised
+
+setup() {
+ einfo "${SERVICE} Setup"
+ echo
+ echo "After completing this setup process, your system will be configured to run the"
+ echo "dnscache service. This service caches DNS (domain name service) lookups; in"
+ echo "other words, it speeds up the time it takes for your machine to resolve hostnames."
+ echo "More information on this package can be found at http://cr.yp.to/djbdns.html."
+ echo
+ einfo "After this script completes, djbdns will be configured and running. Your"
+ einfo "/etc/resolv.conf will be updated so that all DNS lookups are directed to dnscache."
+ einfo "Your original /etc/resolv.conf will be backed up to /etc/resolv.conf.orig."
+ einfo "In addition, dnscache will be configured to start every time your system boots."
+ echo
+ echo "(press any key to begin setup, or press control-C to abort)"
+ echo
+ read
+ if [ ! -e ${SVCDIR} ]
+ then
+ einfo ">>> Setting up ${SVCDIR}..."
+ /usr/bin/dnscache-conf dnscache dnslog ${SVCDIR}
+ einfo ">>> Creating ${CTLDIR} symlink..."
+ ln -s ${SVCDIR} ${CTLDIR}
+ fi
+ if [ ! -e /var/log/${SERVICE}.d ]
+ then
+ einfo ">>> /var/log/${SERVICE}.d points to the dnscache log..."
+ ln -s ${SVCDIR}/log/main /var/log/${SERVICE}.d
+ fi
+ if [ -e /etc/resolv.conf ]
+ then
+ einfo ">>> Backing up /etc/resolv.conf..."
+ cp /etc/resolv.conf /etc/resolv.conf.orig
+ cat /etc/resolv.conf.orig | grep -v nameserver > /etc/resolv.conf
+ echo nameserver 127.0.0.1 >> /etc/resolv.conf
+ einfo ">>> New /etc/resolv.conf has been created."
+ fi
+ echo
+ einfo ">>> Configuring ${SERVICE} to start at system boot..."
+ /usr/sbin/rc-update add dnscache
+ einfo "${SERVICE} setup is complete!"
+}
+
+start() {
+ ebegin "Starting supervised ${SERVICE}"
+ /usr/bin/svc -u ${CTLDIR}
+ /usr/bin/svc -u ${CTLDIR}/log
+ eend $? "Error starting ${SERVICE} supervised."
+}
+
+stop() {
+ ebegin "Stopping supervised ${SERVICE}"
+ /usr/bin/svc -d ${CTLDIR}
+ /usr/bin/svc -d ${CTLDIR}/log
+ eend $? "Error stopping ${SERVICE} supervised"
+}
+
+doservice ${@}
+