BSD 4_3 development
[unix-history] / usr / hosts / MAKEHOSTS
index 8946846..b7d92ff 100755 (executable)
@@ -1,7 +1,20 @@
 #! /bin/sh -x
 cd ${DESTDIR}/usr/hosts
 #! /bin/sh -x
 cd ${DESTDIR}/usr/hosts
-rm -f [a-z]*
-for i in `grep ucb ${DESTDIR}/etc/hosts | grep -v -e '-' | awk '{print $3}'`;
+#
+# We want to save ourselves while cleaning up.  The funny sequence is to
+# minimize the window where the machine could crash and leave MAKEHOSTS
+# misplaced.
+#
+mv MAKEHOSTS .MAKEHOSTS
+/bin/rm -f M*
+mv .MAKEHOSTS MAKEHOSTS
+/bin/rm -f [A-LN-Za-z]*
+for i in `egrep '^128\.32' ${DESTDIR}/etc/hosts | awk '$2 !~ /^ucb|\.berkeley\.edu$/ {print $2} $3 !~ /^ucb|\.berkeley\.edu$|^$/ {print $3} $4 !~ /^ucb|\.berkeley\.edu$|^$/ {print $4}'`;
 do
        ln -s /usr/ucb/rsh $i
 done
 do
        ln -s /usr/ucb/rsh $i
 done
+#
+# Special entries that don't get generated above
+#
+ln -s /usr/ucb/rsh ucbvax
+ln -s /usr/ucb/rsh ucbarpa