Annotation of 43BSDReno/old/MAKEHOSTS/MAKEHOSTS.sh, revision 1.1

1.1     ! root        1: /*-
        !             2:  * Copyright (c) 1987 The Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution and use in source and binary forms are permitted
        !             6:  * provided that: (1) source distributions retain this entire copyright
        !             7:  * notice and comment, and (2) distributions including binaries display
        !             8:  * the following acknowledgement:  ``This product includes software
        !             9:  * developed by the University of California, Berkeley and its contributors''
        !            10:  * in the documentation or other materials provided with the distribution
        !            11:  * and in all advertising materials mentioning features or use of this
        !            12:  * software. Neither the name of the University nor the names of its
        !            13:  * contributors may be used to endorse or promote products derived
        !            14:  * from this software without specific prior written permission.
        !            15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            16:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            18:  *
        !            19:  *     @(#)MAKEHOSTS   5.3 (Berkeley) 5/24/90
        !            20:  */
        !            21: 
        !            22: # program to link to
        !            23: RSH=/usr/bin/rsh
        !            24: 
        !            25: # address search pattern to recognize local hosts
        !            26: LOCALADDR='^128\.32'
        !            27: 
        !            28: # awk pattern for uninteresting (eg, long form) alias
        !            29: SKIP='/^ucb|\.berkeley\.edu$|^$/'
        !            30: 
        !            31: # Special entries that don't get generated normally
        !            32: SPECIAL='ucbvax ucbarpa'
        !            33: 
        !            34: rm -rf TMP_HOSTS hosts.bak
        !            35: mkdir TMP_HOSTS
        !            36: cd TMP_HOSTS
        !            37: 
        !            38: for i in `egrep "$LOCALADDR" ${DESTDIR}/etc/hosts | awk "\\$2 !~ $SKIP {print \\$2} \\$3 !~ $SKIP {print \\$3} \\$4 !~ $SKIP {print \\$4}"`; do
        !            39:        ln -s $RSH $i
        !            40: done
        !            41: 
        !            42: for i in $SPECIAL; do
        !            43:        ln -s $RSH $i
        !            44: done
        !            45: 
        !            46: cd ..
        !            47: mv hosts hosts.bak
        !            48: mv TMP_HOSTS hosts
        !            49: rm -rf hosts.bak

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.