summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/nsswitch
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-05-03 15:14:47 +0000
committerume <ume@FreeBSD.org>2006-05-03 15:14:47 +0000
commitbc8c6150b8b8bcf7f4d87cd487737add8f446366 (patch)
tree57b771293a8b14dea4cb4dbd0c68b00b757d2a78 /etc/rc.d/nsswitch
parenta59756eac2fa7a25a9f1ce64a6fe8be92fede138 (diff)
downloadFreeBSD-src-bc8c6150b8b8bcf7f4d87cd487737add8f446366.zip
FreeBSD-src-bc8c6150b8b8bcf7f4d87cd487737add8f446366.tar.gz
Install /etc/nsswitch.conf statically rather than generating it at
boot. Autogeneration of nsswitch.conf doesn't makes sense in 7.0 since it's not permitted to upgrade from a pre-nss release without passing through an intermediate release. Suggested by: brooks
Diffstat (limited to 'etc/rc.d/nsswitch')
-rw-r--r--etc/rc.d/nsswitch64
1 files changed, 0 insertions, 64 deletions
diff --git a/etc/rc.d/nsswitch b/etc/rc.d/nsswitch
index de12b56..a99459a 100644
--- a/etc/rc.d/nsswitch
+++ b/etc/rc.d/nsswitch
@@ -36,54 +36,6 @@ name="nsswitch"
start_cmd="nsswitch_start"
stop_cmd=":"
-convert_host_conf()
-{
- host_conf=$1; shift;
- nsswitch_conf=$1; shift;
-
- while read line; do
- line=${line##[ ]}
- case $line in
- hosts|local|file)
- _nsswitch="${_nsswitch}${_nsswitch+ }files"
- ;;
- dns|bind)
- _nsswitch="${_nsswitch}${_nsswitch+ }dns"
- ;;
- nis)
- _nsswitch="${_nsswitch}${_nsswitch+ }nis"
- ;;
- '#'*)
- ;;
- *)
- printf "Warning: unrecognized line [%s]", $line > "/dev/stderr"
- ;;
-
- esac
- done < $host_conf
-
- echo "hosts: $_nsswitch" > $nsswitch_conf
-}
-
-generate_nsswitch_conf()
-{
- nsswitch_conf=$1; shift;
-
- cat >$nsswitch_conf <<EOF
-group: compat
-group_compat: nis
-hosts: files dns
-networks: files
-passwd: compat
-passwd_compat: nis
-shells: files
-services: compat
-services_compat: nis
-protocols: files
-rpc: files
-EOF
-}
-
generate_host_conf()
{
nsswitch_conf=$1; shift;
@@ -134,22 +86,6 @@ generate_host_conf()
nsswitch_start()
{
- # Convert host.conf to nsswitch.conf if necessary
- #
- if [ -f "/etc/host.conf" -a ! -f "/etc/nsswitch.conf" ]; then
- echo ''
- echo 'Warning: /etc/host.conf is no longer used'
- echo ' /etc/nsswitch.conf will be created for you'
- convert_host_conf /etc/host.conf /etc/nsswitch.conf
- fi
-
- # Generate default nsswitch.conf if none exists
- #
- if [ ! -f "/etc/nsswitch.conf" ]; then
- echo 'Generating nsswitch.conf.'
- generate_nsswitch_conf /etc/nsswitch.conf
- fi
-
# Generate host.conf for compatibility
#
if [ ! -f "/etc/host.conf" -o \
OpenPOWER on IntegriCloud