Here is a piece of a script we use for cloning RedHat style servers:

cat /mnt/gold/etc/osa.hosts | sed -e "s/98.33.98.x/$ipaddr/g" \
                        -e "s/lixxxx/$host/g" > /mnt/gold/etc/hosts.new
cat /mnt/gold/etc/sysconfig/osa.network | sed -e "s/98.33.98.1/$gateway/g"
\
                         -e "s/lixxxx/$host/g" >
/mnt/gold/etc/sysconfig/network.new
cat /mnt/gold/etc/sysconfig/network-scripts/osa.ifcfg-eth0 | sed -e
"s/98.33.98.x/$ipaddr/g" \
                          -e "s/98.33.98.255/$broadcast/g" \
                          -e "s/255.255.255.0/$mask/g" \
                          -e "s/98.33.98.0/$netaddr/g" >
/mnt/gold/etc/sysconfig/network-scripts/ifcfg-eth0.new
cat /mnt/gold/etc/sysconfig/network-scripts/osa.ifcfg-eth0:0 | sed -e
"s/98.33.98.x/$secipadr/g" \
                          -e "s/98.33.98.255/$broadcast/g" \
                          -e "s/255.255.255.0/$mask/g" \
                          -e "s/98.33.98.0/$netaddr/g" >
/mnt/gold/etc/sysconfig/network-scripts/ifcfg-eth0:0.new
cat /mnt/gold/etc/osa.dtpasswd | sed -e "s/lixxxx/$host/g" >
/mnt/gold/etc/dtpasswd.new
cat /mnt/gold/etc/httpd/conf/osa.hostname.conf | sed -e
"s/98.33.98.x/$ipaddr/g" \
                        -e "s/lixxxx/$host/g" >
/mnt/gold/etc/httpd/conf/hostname.cnew
mv /mnt/gold/etc/hosts.new  /mnt/gold/etc/hosts
mv /mnt/gold/etc/sysconfig/network.new /mnt/gold/etc/sysconfig/network
mv /mnt/gold/etc/sysconfig/network-scripts/ifcfg-eth0.new
/mnt/gold/etc/sysconfig/network-scripts/ifcfg-eth0
mv /mnt/gold/etc/sysconfig/network-scripts/ifcfg-eth0:0.new
/mnt/gold/etc/sysconfig/network-scripts/ifcfg-eth0:0
mv /mnt/gold/etc/dtpasswd.new  /mnt/gold/etc/dtpasswd
mv /mnt/gold/etc/httpd/conf/hostname.cnew
/mnt/gold/etc/httpd/conf/hostname.conf


Carlos :-)



Carlos A. Ordonez
IBM Corporation
Server Consolidation



|---------+--------------------------->
|         |           Chet Norris     |
|         |           <chet10719@yahoo|
|         |           .com>           |
|         |           Sent by: Linux  |
|         |           on 390 Port     |
|         |           <[EMAIL PROTECTED]|
|         |           RIST.EDU>       |
|         |                           |
|         |                           |
|         |           05/03/2002 09:20|
|         |           AM              |
|         |           Please respond  |
|         |           to Linux on 390 |
|         |           Port            |
|         |                           |
|---------+--------------------------->
  
>-------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                           |
  |        To:      [EMAIL PROTECTED]                                            
                                           |
  |        cc:                                                                         
                                           |
  |                 From:                                                              
                                           |
  |               Subject:      CLONING Process under RH 7.2                           
                                           |
  |                                                                                    
                                           |
  
>-------------------------------------------------------------------------------------------------------------------------------|




I'm currently running multiple test images of SuSE 7.0 under VIF, using
the Distributions redbook (section 16.6.8) cloning process, and it
works great. What files would need to be changed to do the same process
under RedHat 7.2? To clone a SuSE image I have been modifying the IP
address and image name in etc/hosts, etc/rc.config and etc/route.conf.

=====
Chet Norris
Marriott International,Inc.

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

Reply via email to