Hey,
First of all I'm sorry for my bad english.
and Thx god for this Site

very helpful !!!
i'm loking for script for bonding on rhel 5.
I wrote a script, but I think he's silly and Not professional.
also I want to ask from user some data. for example the ip for bond interface.
This is my script.
Code:
function fn_interface_bonding {
file_bond=/etc/sysconfig/network-scripts/ifcfg-bond0
file_eth0=/etc/sysconfig/network-scripts/ifcfg-eth0
file_eth1=/etc/sysconfig/network-scripts/ifcfg-eth1
echo "What is the IP address for bond0 interface?"
read ipaddress
echo "What is the netmask?"
read netmask
echo "And the Default Gateway?"
read gateway
if [[ ! -f $file_bond ]]; then
touch $file_bond
fi
if [[ -s $file_bond ]]; then
printf "\t\t\tBackup /etc/sysconfig/network-scripts/ifcfg-* files... \n"
printf "\t\t\tBackup /etc/sysconfig/network file... \n"
printf "\t\t\tBackup /etc/modprobe.conf file... \n"
backup
echo "IPADDRESS=$ipaddress" > $file_bond
echo "NETMASK=$netmask" >> $file_bond
echo "DEVICE=bond0" >> $file_bond
echo "BOOTPROTO=none" >> $file_bond
echo "ONBOOT=yes" >> $file_bond
echo "TYPE=Ethernet" >> $file_bond
echo "GATEWAY=$gateway" >> $file_hostname
echo "options bond0 mode=1 arp_interval=100 arp_ip_target=$gateway" >> $modprobe
echo "USERCTL=no" >> $file_eth0
echo "USERCTL=no" >> $file_eth1
echo "SLAVE=yes" >> $file_eth0
echo "SLAVE=yes" >> $file_eth1
echo "MASTER=bond0" >> $file_eth0
echo "MASTER=bond0" >> $file_eth1
sed -e 's/BOOTPROTO.*/BOOTPROTO=none/' $file_eth0
sed -e 's/BOOTPROTO.*/BOOTPROTO=none/' $file_eth1
sed -e 's/HWADDR.*/#HWADDR/'
sed -e 's/HWADDR.*/#HWADDR/'
service network restart
fi
}
fn_interface_bonding
thx all