Listing 6. doitfor Script
#!/bin/sh
### doitfor: Written by Ali R B 28th March 2000
###################################################
### Change various host dependent info on the
### copied disk so that it works properly
###################################################
hostname=$1 hostip=$2
cd /kickstart; rm -f install.tar.gz ks.cfg
cp dhcpd.conf.save dhcpd.conf
cp installfiles/postinstall.save
installfiles/postinstall
cp ks.save ks.cfg
./streplace ks.cfg dhcpd.conf
installfiles/postinstall -x -w
hostname=$hostname hostip=$hostip
tar -cvzf install.$hostip.tar.gz installfiles
cp -fdhcpd.conf /etc/
cd superkick
./superkick
cd ..
rm -rf /var/state/dhcp/dhcpd.leases
touch /var/state/dhcp/dhcpd.leases
/etc/rc.d/init.d/dhcpd restart
cd /kickstart
rm -f ks.cfg dhcpd.conf installfiles/postinstall