[Lunar-commits] r16201 - in moonbase/trunk/libs/glibc: . init.d
Auke Kok
sofar at lunar-linux.org
Tue Aug 23 10:43:48 UTC 2005
Author: sofar
Date: 2005-08-23 10:43:44 +0000 (Tue, 23 Aug 2005)
New Revision: 16201
Added:
moonbase/trunk/libs/glibc/init.d/
moonbase/trunk/libs/glibc/init.d/nscd
moonbase/trunk/libs/glibc/nscd.conf
Modified:
moonbase/trunk/libs/glibc/BUILD
Log:
Adding nscd init.d script and nscd.conf. The script works fine and should provide better response on most systems. I never knew nscd was actually inside glibc ;^).
Modified: moonbase/trunk/libs/glibc/BUILD
===================================================================
--- moonbase/trunk/libs/glibc/BUILD 2005-08-23 10:41:14 UTC (rev 16200)
+++ moonbase/trunk/libs/glibc/BUILD 2005-08-23 10:43:44 UTC (rev 16201)
@@ -140,6 +140,10 @@
rm /lib/libnsl-lunar.so &&
rm /lib/libcrypt-lunar.so &&
+ if [ ! -e /etc/nscd.conf ] ; then
+ install -m0644 $SCRIPT_DIRECTORY/nscd.conf /etc/
+ fi &&
+
# Generate locale info
unset LD_PRELOAD &&
if [ -z "$GLIBC_LOCALES" ]; then
Added: moonbase/trunk/libs/glibc/init.d/nscd
===================================================================
--- moonbase/trunk/libs/glibc/init.d/nscd 2005-08-23 10:41:14 UTC (rev 16200)
+++ moonbase/trunk/libs/glibc/init.d/nscd 2005-08-23 10:43:44 UTC (rev 16201)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# chkconfig: 2345 20 80
+# description: nscd is the glibc name service caching daemon - see man nscd
+# processname: /usr/sbin/nscd
+# sigreload: HUP
+
+start ()
+{
+ echo -n "Starting nscd: "
+ /usr/sbin/nscd &&
+ echo -e $RESULT_OK || echo -e $RESULT_FAIL
+}
+
+stop ()
+{
+ echo -n "Stopping nscd: "
+ /usr/sbin/nscd --shutdown &&
+ echo -e $RESULT_OK || echo -e $RESULT_FAIL
+}
+
+status ()
+{
+ echo -n "Service nscd: "
+ /bin/pgrep -P 1 nscd > /dev/null &&
+ echo -e $RESULT_OK || echo -e $RESULT_FAIL
+}
+
+. /lib/lsb/init-functions $1
+
Property changes on: moonbase/trunk/libs/glibc/init.d/nscd
___________________________________________________________________
Name: svn:executable
+ *
Added: moonbase/trunk/libs/glibc/nscd.conf
===================================================================
--- moonbase/trunk/libs/glibc/nscd.conf 2005-08-23 10:41:14 UTC (rev 16200)
+++ moonbase/trunk/libs/glibc/nscd.conf 2005-08-23 10:43:44 UTC (rev 16201)
@@ -0,0 +1,45 @@
+#
+# /etc/nscd.conf
+#
+# An example Name Service Cache config file. This file is needed by nscd.
+#
+# Legal entries are:
+#
+# logfile <file>
+# debug-level <level>
+# threads <#threads to use>
+# server-user <user to run server as instead of root>
+# server-user is ignored if nscd is started with -S parameters
+#
+# enable-cache <service> <yes|no>
+# positive-time-to-live <service> <time in seconds>
+# negative-time-to-live <service> <time in seconds>
+# suggested-size <service> <prime number>
+# check-files <service> <yes|no>
+#
+# Currently supported cache names (services): passwd, group, hosts
+#
+
+
+# logfile /var/log/nscd.log
+# threads 6
+ server-user nscd
+ debug-level 0
+
+ enable-cache passwd yes
+ positive-time-to-live passwd 600
+ negative-time-to-live passwd 20
+ suggested-size passwd 211
+ check-files passwd yes
+
+ enable-cache group yes
+ positive-time-to-live group 3600
+ negative-time-to-live group 60
+ suggested-size group 211
+ check-files group yes
+
+ enable-cache hosts yes
+ positive-time-to-live hosts 3600
+ negative-time-to-live hosts 20
+ suggested-size hosts 211
+ check-files hosts yes
More information about the Lunar-commits
mailing list