bug 3808: error info when running confignics

This commit is contained in:
xq2005 2013-10-08 01:45:23 -07:00
parent 9c409845ba
commit 80291f4473

View File

@ -784,9 +784,13 @@ else
num_ipv4_index=0
num_ipv6_index=0
num_index=0
cat $str_his_file | grep $str_nic_name
if [ $? -ne 0 ];then
echo "${str_nic_name}" >> $str_his_file
if [ -e "$str_his_file" ];then
grep $str_nic_name $str_his_file
if [ $? -ne 0 ];then
echo "${str_nic_name}" >> $str_his_file
fi
else
echo "${str_nic_name}" > $str_his_file
fi
#delete the old alias configuration files on redhat
if [ "$str_os_type" = "redhat" ];then