From 818b498d0b06bd56946cccb0eb48b2e22e57e763 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Thu, 19 Jun 2003 10:14:35 +0000 Subject: Fixing crappy output during ka duplication --- rescue/tree/ka/setup_network.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/rescue/tree/ka/setup_network.sh b/rescue/tree/ka/setup_network.sh index 06339beaf..89ddd2c91 100755 --- a/rescue/tree/ka/setup_network.sh +++ b/rescue/tree/ka/setup_network.sh @@ -50,21 +50,21 @@ cat "$old" | grep -v ^HOSTNAME= > "$new" echo "HOSTNAME=$myname" >> "$new" # assume first NIC is the gatewaydev (right ? wrong ?) -firstnic=`grep ^GATEWAYDEV "$new" | cut -d = -f 2 | tr -d \"` -echo GATEWAYDEV=$firstnic +#firstnic=`grep ^GATEWAYDEV "$new" | cut -d = -f 2 | tr -d \"` +#echo GATEWAYDEV=$firstnic # see if IP has to be written -proto=`grep ^BOOTPROTO /mnt/disk/etc/sysconfig/network-scripts/ifcfg-$firstnic | cut -d = -f 2 | tr -d \"` -echo PROTO=$proto -if [ "$proto" != "dhcp" ]; then - # proto is static, write the new IP in the config file - old=/mnt/disk/etc/sysconfig/network-scripts/ifcfg-$firstnic.beforeka - new=/mnt/disk/etc/sysconfig/network-scripts/ifcfg-$firstnic - - rm -f "$old" - mv "$new" "$old" - cat "$old" | grep -v ^IPADDR= > "$new" - echo IPADDR=$ip >> "$new" -fi +#proto=`grep ^BOOTPROTO /mnt/disk/etc/sysconfig/network-scripts/ifcfg-$firstnic | cut -d = -f 2 | tr -d \"` +#echo PROTO=$proto +#if [ "$proto" != "dhcp" ]; then +# # proto is static, write the new IP in the config file +# old=/mnt/disk/etc/sysconfig/network-scripts/ifcfg-$firstnic.beforeka +# new=/mnt/disk/etc/sysconfig/network-scripts/ifcfg-$firstnic +# +# rm -f "$old" +# mv "$new" "$old" +# cat "$old" | grep -v ^IPADDR= > "$new" +# echo IPADDR=$ip >> "$new" +#fi cd $curdir -- cgit v1.2.1