#!/bin/sh # Setp the right hostnames and IP adresses on all systems after a clone # KL , May 2001 bandung let x=2 let end=25 while [ $x -le $end ] ; do echo "Processing linux$x ..." rsh linux$x "echo linux$x.course.bandung > /etc/HOSTNAME" rsh linux$x "mv /etc/rc.d/rc.inet1 /tmp; \ sed -e 's/192.168.20.2/192.168.20.$x/' \ < /tmp/rc.inet1 > /etc/rc.d/rc.inet1" (( x++ )) done