12 # Add the following lines to /etc/rc.conf to enable nscd:
16 # See nscd(8) for flags
22 desc="Name-service caching daemon"
25 command=/usr/sbin/nscd
26 extra_commands="flush"
27 flush_cmd="${command} -I all"
29 # usage: _nscd_set_option <option name> <default value>
32 local _optname _defoptval _nscd_opt_val _cached_opt_val
36 _nscd_opt_val=$(eval "echo \$nscd_${_optname}")
37 _cached_opt_val=$(eval "echo \$cached_${_optname}")
39 if [ -n "$_cached_opt_val" -a "$_nscd_opt_val" != "$_defoptval" ]; then
40 warn "You should use nscd_${_optname} instead of" \
42 setvar "nscd_${_optname}" "$_cached_opt_val"
44 setvar "nscd_${_optname}" "${_nscd_opt_val:-$_defoptval}"
50 _nscd_set_option "enable" "NO"
51 _nscd_set_option "pidfile" "/var/run/nscd.pid"
52 _nscd_set_option "flags" ""