> Can some give me the directions on the proper steps to change the system
> name and the IP address of my test Linux system

Here is the guts of changes made by the clone.sh script from "The
Virtualization Cookbook". The variable names should be self-explanatory:

cat $master_mnt_pt/etc/HOSTNAME | sed \
  -e "s/$source_hostname/$target_hostname/g" > $cloned_mnt_pt/etc/HOSTNAME
cat $master_mnt_pt/etc/hosts | sed \
  -e "s/$source_IP/$target_IP/g" \
  -e "s/$source_guestID/$clone_id/g" \
  -e "s/$source_domain/$source_domain/g" > $cloned_mnt_pt/etc/hosts
cat $master_mnt_pt/etc/defaultdomain | sed \
  -e "s/$source_domain/$source_domain/g" >
$cloned_mnt_pt/etc/defaultdomain
cat $master_mnt_pt/etc/sysconfig/network/routes | sed \
  -e "s/$source_GW/$target_GW/g" >
$cloned_mnt_pt/etc/sysconfig/network/routes
cat
$master_mnt_pt/etc/sysconfig/network/ifcfg-qeth-bus-ccw-0.0.$source_readdev
| sed \
  -e "s/$source_IP/$target_IP/g" \
  -e "s/$source_MTU/$target_MTU/g" \
  -e "s/$source_mask/$target_mask/g" > \

$cloned_mnt_pt/etc/sysconfig/network/ifcfg-qeth-bus-ccw-0.0.$target_readdev
cat $master_mnt_pt/etc/resolv.conf | sed \
  -e "s/$source_domain/$source_domain/g"\
  -e "s/$source_DNS/$target_DNS/g" > $cloned_mnt_pt/etc/resolv.conf
# Regenerate SSH keys
echo "Regenerating SSH keys in $cloned_mnt_pt/etc/ssh/ ..."
rm $cloned_mnt_pt/etc/ssh/ssh_host*
ssh-keygen -t rsa -N "" -q -f $cloned_mnt_pt/etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -N "" -q -f $cloned_mnt_pt/etc/ssh/ssh_host_dsa_key
ssh-keygen -t rsa1 -N "" -q -f $cloned_mnt_pt/etc/ssh/ssh_host_key


Hope this helps.

"Mike MacIsaac" <[EMAIL PROTECTED]>   (845) 433-7061

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to