Deleted Added
full compact
26c26
< # $FreeBSD: head/etc/rc.d/nsswitch 129650 2004-05-24 11:48:58Z des $
---
> # $FreeBSD: head/etc/rc.d/nsswitch 129651 2004-05-24 11:53:26Z des $
56a57,71
> generate_nsswitch_conf()
> {
> nsswitch_conf=$1; shift;
>
> cat >$nsswitch_conf <<EOF
> group: compat
> group_compat: nis
> hosts: dns files
> networks: files
> passwd: compat
> passwd_compat: nis
> shells: files
> EOF
> }
>
90,96d104
< # Generate host.conf for compatibility
< #
< if [ -f "/etc/nsswitch.conf" ]; then
< echo 'Generating host.conf.'
< generate_host_conf /etc/nsswitch.conf /etc/host.conf
< fi
<
104a113,127
>
> # 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" ]; then
> echo 'Generating host.conf.'
> generate_host_conf /etc/nsswitch.conf /etc/host.conf
> fi
>