]> Frank Brehm's Git Trees - config/uhu1/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorroot <root@uhu1.uhu-banane.de>
Mon, 23 Apr 2012 10:34:49 +0000 (12:34 +0200)
committerroot <root@uhu1.uhu-banane.de>
Mon, 23 Apr 2012 10:34:49 +0000 (12:34 +0200)
.etckeeper
init.d/._cfg0000_nscd [new file with mode: 0755]

index 587dcf1c077f8bcd7ecd2bc1cc00ad2f5aa2150c..df5068363d761f36ed2b6519d4480a555b18dd2e 100755 (executable)
@@ -725,6 +725,7 @@ maybe chmod 0644 './idn.conf.sample'
 maybe chmod 0644 './idnalias.conf'
 maybe chmod 0644 './idnalias.conf.sample'
 maybe chmod 0755 './init.d'
+maybe chmod 0755 './init.d/._cfg0000_nscd'
 maybe chmod 0755 './init.d/acpid'
 maybe chmod 0755 './init.d/amavisd'
 maybe chmod 0755 './init.d/apache2'
diff --git a/init.d/._cfg0000_nscd b/init.d/._cfg0000_nscd
new file mode 100755 (executable)
index 0000000..e613715
--- /dev/null
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/nscd,v 1.5 2011/08/29 05:21:40 vapier Exp $
+
+depend() {
+       use dns ldap net slapd
+}
+
+checkconfig() {
+       if [ ! -d /var/run/nscd ] ; then
+               checkpath -d -m 755 /var/run/nscd
+       fi
+       if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then
+               ewarn "nscd run dir is not world readable, you should reset the perms:"
+               ewarn "chmod 755 /var/run/nscd"
+               ewarn "chmod a+rw /var/run/nscd/socket"
+               ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
+       fi
+
+       if grep -qs '^[[:space:]]*persistent\>' /etc/nscd.conf ; then
+               checkpath -d -m 700 /var/db/nscd
+       fi
+}
+
+start() {
+       checkconfig
+
+       ebegin "Starting Name Service Cache Daemon"
+
+       local secure=`while read curline ; do
+               table=${curline%:*}
+               entries=${curline##$table:}
+               table=${table%%[^a-z]*}
+               case $table in
+                       passwd*|group*|hosts)
+                       for entry in $entries ; do
+                       case $entry in
+                               nisplus*)
+                                       /usr/sbin/nscd_nischeck $table || \
+                                       /echo "-S $table,yes"
+                               ;;
+                       esac
+                       done
+               ;;
+               esac
+               done < /etc/nsswitch.conf`
+
+       local pidfile="/var/run/nscd/nscd.pid"
+       mkdir -p "${pidfile%/*}"
+
+       start-stop-daemon --start --quiet \
+               --exec /usr/sbin/nscd --pidfile ${pidfile} \
+               -- $secure
+       eend $?
+}
+
+stop() {
+       local pidfile="/var/run/nscd/nscd.pid"
+       ebegin "Shutting down Name Service Cache Daemon"
+       start-stop-daemon --stop --quiet \
+               --exec /usr/sbin/nscd --pidfile ${pidfile}
+       eend $?
+}
+
+# vim:ts=4