#!/bin/sh # # $Id$ while read line do set -- $line ip=$1; fqdn=$2 OLDIFS=$IFS; IFS=. set -- $fqdn host=$1 IFS=$OLDIFS sed -e "/^network/s/dhcp/static --ip $ip --netmask 255.255.248.0 --gateway 131.225.87.200 --nameserver 131.225.8.120 --hostname $fqdn/" ks.cfg >| ks.cfg.$host cp ks.img ks.img.$host sudo mount ks.img.$host /mnt -t msdos -o loop sudo cp ks.cfg.$host /mnt/ks.cfg sudo umount /mnt done