summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-04-28 12:03:38 +0000
committerume <ume@FreeBSD.org>2006-04-28 12:03:38 +0000
commite14f1c3b3b31e7f6c28cef5acc87f4c7373d288c (patch)
treed796503361cc28eb3b9eaa593876abd826a2cf81 /etc
parent4b38e5bbca25f143cbf615b8c7fe1f7873ba1e6c (diff)
downloadFreeBSD-src-e14f1c3b3b31e7f6c28cef5acc87f4c7373d288c.zip
FreeBSD-src-e14f1c3b3b31e7f6c28cef5acc87f4c7373d288c.tar.gz
- Extend the nsswitch to support Services, Protocols and Rpc
databases. - Make nsswitch support caching. Submitted by: Michael Bushkov <bushman__at__rsu.ru> Sponsored by: Google Summer of Code 2005
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile4
-rw-r--r--etc/cached.conf12
-rw-r--r--etc/defaults/rc.conf1
-rw-r--r--etc/nscd.conf12
-rwxr-xr-xetc/rc.d/Makefile4
-rw-r--r--etc/rc.d/cached30
-rw-r--r--etc/rc.d/nscd30
7 files changed, 93 insertions, 0 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 9933975..e2fa4bb 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -35,6 +35,10 @@ BSM_ETC_DIR= ${DESTDIR}/etc/security
BIN1+= printcap
.endif
+.if ${MK_NS_CACHING} != "no"
+BIN1+= cached.conf
+.endif
+
.if ${MK_OPENSSH} != "no"
SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
${.CURDIR}/../crypto/openssh/sshd_config \
diff --git a/etc/cached.conf b/etc/cached.conf
new file mode 100644
index 0000000..19a8b5b
--- /dev/null
+++ b/etc/cached.conf
@@ -0,0 +1,12 @@
+#
+# Default caching daemon configuration file
+# $FreeBSD$
+#
+
+enable-cache passwd yes
+enable-cache group yes
+enable-cache hosts yes
+enable-cache services yes
+enable-cache protocols yes
+enable-cache rpc yes
+enable-cache networks yes
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 316705e..6d92919 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -472,6 +472,7 @@ sendmail_msp_queue_flags="-L sm-msp-queue -Ac -q30m"
auditd_enable="NO" # Run the audit daemon.
auditd_flags="" # Which options to pass to the audit daemon.
+cached_enable="NO" # Run the nsswitch caching daemon.
cron_enable="YES" # Run the periodic job daemon.
cron_program="/usr/sbin/cron" # Which cron executable to run (if enabled).
cron_dst="YES" # Handle DST transitions intelligently (YES/NO)
diff --git a/etc/nscd.conf b/etc/nscd.conf
new file mode 100644
index 0000000..19a8b5b
--- /dev/null
+++ b/etc/nscd.conf
@@ -0,0 +1,12 @@
+#
+# Default caching daemon configuration file
+# $FreeBSD$
+#
+
+enable-cache passwd yes
+enable-cache group yes
+enable-cache hosts yes
+enable-cache services yes
+enable-cache protocols yes
+enable-cache rpc yes
+enable-cache networks yes
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index a955b76..45ffa4a 100755
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -46,6 +46,10 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
FILES+= sshd
.endif
+.if ${MK_NS_CACHING} != "no"
+FILES+= cached
+.endif
+
FILESDIR= /etc/rc.d
FILESMODE= ${BINMODE}
diff --git a/etc/rc.d/cached b/etc/rc.d/cached
new file mode 100644
index 0000000..0376b58
--- /dev/null
+++ b/etc/rc.d/cached
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: cached
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+#
+# Add the following lines to /etc/rc.conf to enable cached:
+#
+# cached_enable="YES"
+#
+# See cached(8) for flags
+#
+
+. /etc/rc.subr
+
+name=cached
+rcvar=`set_rcvar`
+
+command=/usr/sbin/cached
+
+cached_enable=${cached_enable:-"NO"}
+cached_pidfile=${cached_pidfile:-"/var/run/cached.pid"}
+cached_flags=${cached_flags:-""}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/etc/rc.d/nscd b/etc/rc.d/nscd
new file mode 100644
index 0000000..0376b58
--- /dev/null
+++ b/etc/rc.d/nscd
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: cached
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+#
+# Add the following lines to /etc/rc.conf to enable cached:
+#
+# cached_enable="YES"
+#
+# See cached(8) for flags
+#
+
+. /etc/rc.subr
+
+name=cached
+rcvar=`set_rcvar`
+
+command=/usr/sbin/cached
+
+cached_enable=${cached_enable:-"NO"}
+cached_pidfile=${cached_pidfile:-"/var/run/cached.pid"}
+cached_flags=${cached_flags:-""}
+
+load_rc_config $name
+run_rc_command "$1"
OpenPOWER on IntegriCloud