It starts and shutsdown the Name Service Cache Daemon as robin says. Same here, I can''t figure out the difference with or without it.
#!/usr/bin/openrc-run
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use dns ldap net slapd
}
checkconfig() {
if [ ! -d /run/nscd ] ; then
mkdir -p /run/nscd
chmod 755 /run/nscd
fi
if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /run/nscd)" != "755" ] ; then
echo ""
ewarn "nscd run dir is not world readable, you should reset the perms:"
ewarn "chmod 755 /run/nscd"
ewarn "chmod a+rw /run/nscd/socket"
echo ""
ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
echo ""
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/bin/nscd_nischeck $table || \
/echo "-S $table,yes"
;;
esac
done
;;
esac
done < /etc/nsswitch.conf`
local pidfile="$(strings /usr/bin/nscd | grep nscd.pid)"
mkdir -p "$(dirname ${pidfile})"
save_options pidfile "${pidfile}"
start-stop-daemon --start --quiet \
--exec /usr/bin/nscd --pidfile "${pidfile}" \
-- $secure
eend $?
}
stop() {
local pidfile="$(get_options pidfile)"
[ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}"
ebegin "Shutting down Name Service Cache Daemon"
start-stop-daemon --stop --quiet --exec /usr/bin/nscd ${pidfile}
eend $?
}
# vim:ts=4
# Begin /etc/nsswitch.conf
passwd: compat mymachines
group: compat mymachines
shadow: compat
publickey: files
hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: files
# End /etc/nsswitch.conf
After you add it check to see what services OpenRC runs
$ sudo rc-update show -a