diff options
author | bushman <bushman@FreeBSD.org> | 2007-09-28 10:38:08 +0000 |
---|---|---|
committer | bushman <bushman@FreeBSD.org> | 2007-09-28 10:38:08 +0000 |
commit | a947d503156d99f0c775e19946e40c413ef41242 (patch) | |
tree | f0b4429f6c4f2e07780dbda5127778b30921f2e8 /etc | |
parent | 1c797edf6bc8751b4d32db986f024da83d34a1f0 (diff) | |
download | FreeBSD-src-a947d503156d99f0c775e19946e40c413ef41242.zip FreeBSD-src-a947d503156d99f0c775e19946e40c413ef41242.tar.gz |
Finishing renaming of cached into nscd. etc/rc.d and usr.sbin/Makefile
updated. Note added to UPDATING.
Approved by: re (kensmith, bmah), brooks (mentor)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/defaults/rc.conf | 2 | ||||
-rwxr-xr-x | etc/rc.d/Makefile | 2 | ||||
-rw-r--r-- | etc/rc.d/nscd | 28 |
3 files changed, 26 insertions, 6 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 4b48f5f..1027ec1 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -495,7 +495,6 @@ sendmail_rebuild_aliases="NO" # Run newaliases if necessary (YES/NO). auditd_enable="NO" # Run the audit daemon. auditd_program="/usr/sbin/auditd" # Path to 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) @@ -503,6 +502,7 @@ cron_flags="" # Which options to pass to the cron daemon. lpd_enable="NO" # Run the line printer daemon. lpd_program="/usr/sbin/lpd" # path to lpd, if you want a different one. lpd_flags="" # Flags to lpd (if enabled). +nscd_enable="NO" # Run the nsswitch caching daemon. chkprintcap_enable="NO" # Run chkprintcap(8) before running lpd. chkprintcap_flags="-d" # Create missing directories by default. dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO). diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index d6d0849..56aa598 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -48,7 +48,7 @@ FILES+= sshd .endif .if ${MK_NS_CACHING} != "no" -FILES+= cached +FILES+= nscd .endif FILESDIR= /etc/rc.d diff --git a/etc/rc.d/nscd b/etc/rc.d/nscd index 54d6bcc..3eb8823 100644 --- a/etc/rc.d/nscd +++ b/etc/rc.d/nscd @@ -8,7 +8,7 @@ # BEFORE: LOGIN # -# Add the following lines to /etc/rc.conf to enable cached: +# Add the following lines to /etc/rc.conf to enable nscd: # # nscd_enable="YES" # @@ -24,9 +24,29 @@ command=/usr/sbin/nscd extra_commands="flush" flush_cmd="${command} -I all" -nscd_enable=${nscd_enable:-"NO"} -nscd_pidfile=${nscd_pidfile:-"/var/run/nscd.pid"} -nscd_flags=${nscd_flags:-""} +# usage: _nscd_set_option <option name> <default value> +# +_nscd_set_option() { + local _optname _defoptval _nscd_opt_val _cached_opt_val + _optname=$1 + _defoptval=$2 + + _nscd_opt_val=$(eval "echo \$nscd_${_optname}") + _cached_opt_val=$(eval "echo \$cached_${_optname}") + + if [ -n "$_cached_opt_val" -a "$_nscd_opt_val" != "$_defoptval" ]; then + warn "You should use nscd_${_optname} instead of" \ + "cached_${_optname}" + setvar "nscd_${_optname}" "$_cached_opt_val" + else + setvar "nscd_${_optname}" "${_nscd_opt_val:-$_defoptval}" + fi +} + load_rc_config $name +_nscd_set_option "enable" "NO" +_nscd_set_option "pidfile" "/var/run/nscd.pid" +_nscd_set_option "flags" "" run_rc_command "$1" + |