|
|
1.1 ! root 1: #!/bin/sh - ! 2: # ! 3: # Copyright (c) 1987 Regents of the University of California. ! 4: # All rights reserved. ! 5: # ! 6: # Redistribution and use in source and binary forms are permitted ! 7: # provided that the above copyright notice and this paragraph are ! 8: # duplicated in all such forms and that any documentation, ! 9: # advertising materials, and other materials related to such ! 10: # distribution and use acknowledge that the software was developed ! 11: # by the University of California, Berkeley. The name of the ! 12: # University may not be used to endorse or promote products derived ! 13: # from this software without specific prior written permission. ! 14: # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 15: # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 16: # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 17: # ! 18: # %W% (Berkeley) %G% ! 19: # ! 20: ! 21: # program to link to ! 22: RSH=/usr/ucb/rsh ! 23: ! 24: # address search pattern to recognize local hosts ! 25: LOCALADDR='^128\.32' ! 26: ! 27: # awk pattern for uninteresting (eg, long form) alias ! 28: SKIP='/^ucb|\.berkeley\.edu$|^$/' ! 29: ! 30: # Special entries that don't get generated normally ! 31: SPECIAL='ucbvax ucbarpa' ! 32: ! 33: rm -rf TMP_HOSTS hosts.bak ! 34: mkdir TMP_HOSTS ! 35: cd TMP_HOSTS ! 36: ! 37: for i in `egrep "$LOCALADDR" ${DESTDIR}/etc/hosts | awk "\\$2 !~ $SKIP {print \\$2} \\$3 !~ $SKIP {print \\$3} \\$4 !~ $SKIP {print \\$4}"`; do ! 38: ln -s $RSH $i ! 39: done ! 40: ! 41: for i in $SPECIAL; do ! 42: ln -s $RSH $i ! 43: done ! 44: ! 45: cd .. ! 46: mv hosts hosts.bak ! 47: mv TMP_HOSTS hosts ! 48: rm -rf hosts.bak
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.