defect 4125:support to have parameters in niccustomscripts attribute

This commit is contained in:
daniceexi 2014-05-21 04:37:35 -04:00
parent 2bd823ec59
commit c3129c1701

View File

@ -19,16 +19,19 @@ function splitconfig(){
IFS=$','
array_conf_temp=($1)
IFS=$old_ifs
for i in ${array_conf_temp[@]}
i=0
while [ $i -lt ${#array_conf_temp[@]} ]
do
token="${array_conf_temp[$i]}"
D=
if [ `echo $i | grep "!"` ];then
if echo "$token" | grep "!"; then
D="!"
else
D=":"
fi
key=`echo $i | cut -d"$D" -f 1`
str_temp_value=`echo $i | cut -d"$D" -f 2`
key=`echo "$token" | cut -d"$D" -f 1`
str_temp_value=`echo "$token" | cut -d"$D" -f 2`
str_temp=$(hashget hash_defined_nics $key)
if [ -n "$str_temp" ];then
@ -37,7 +40,8 @@ function splitconfig(){
str_temp="$str_temp_value"
str_all_nics=$str_all_nics"$key "
fi
hashset hash_defined_nics $key $str_temp
hashset hash_defined_nics $key "$str_temp"
i=$((i+1))
done
}
@ -198,8 +202,8 @@ if [ -z "$NICIPS" ];then
exit 0
fi
splitconfig $NICIPS
splitconfig $NICCUSTOMSCRIPTS
splitconfig "$NICIPS"
splitconfig "$NICCUSTOMSCRIPTS"
if [ $boot_myscript -eq 1 ];then
. $str_dir_name/$myscript