5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
24 #ident "%Z%%M% %I% %E% SMI"
26 # Copyright (c) 1996, by Sun Microsystems, Inc.
27 # All rights reserved.
29 # Script to examine hosts file and make "magic" entries for
30 # those hosts that have multiple IP addresses.
34 MAKEDBM
=/usr
/sbin
/makedbm
35 STDHOSTS
=/usr
/lib
/netsvc
/yp
/stdhosts
36 MULTIAWK
=/usr
/lib
/netsvc
/yp
/multi.
awk
39 USAGE
="Usage: multi [-b] [-l] [-s] [-n] [hosts file]
41 -b Add YP_INTERDOMAIN flag to hosts map
42 -l Convert keys to lower case before creating map
43 -s Add YP_SECURE flag to hosts map
44 -n Add IPv6 and IPv4 host addresses to ipnodes map
46 hosts file defaults to /etc/hosts"
60 if [ "$NFLAG" = "-n" ]
65 shift `expr $OPTIND - 1`
70 elif [ "$NFLAG" = "-n" ]
72 HOSTS
=/etc
/inet
/ipnodes
82 cd /var
/yp
/`domainname` && \
83 sed -e '/^[ ]*$/d' -e '/^#/d' -e 's/#.*$//' $HOSTS | \
86 $MAKEDBM $BFLAG $LFLAG $SFLAG - $MAP