defect 4125:support to have parameters in niccustomscripts attribute
This commit is contained in:
parent
802366a48e
commit
a40eb3d054
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user