bug 3808: error info when running confignics

This commit is contained in:
xq2005 2013-10-08 01:42:55 -07:00
parent 7ec38c7be8
commit 80deb78f25

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