functionconfig_set_key_value() {local config=$1local key=$2local value=$3# check value is number or character (number is integer)if [ "$value"-eq"$value" ] 2>/dev/null;thenecho"value is number">/dev/nullelse value="\"$value\""fi# check config "=" rear " ", if exist " ", same set config value as same value_char1=`grep-v "^#" $config |grep-v "^$" |tail-1|awk-F= '{print $2}' |cut-c1`if [ "$value_char1"=" " ];then key="$key " value=" $value"elseecho"no change $key and $value">/dev/nullfised-i-e"/^$key=/ s#=.*#=$value#" $config check_line=`grep^$key $config` set_line="$key=$value"if [ "$check_line"="$set_line" ];thenecho"config $config set $key as $value SUCCESS">/dev/nullelseecho"append set $key as $value to config $config">/dev/nullecho"$key=$value">> $configfi}config_set_key_value/etc/sysconfig/grubGRUB_TIMEOUT10config_set_key_value/etc/libvirt/qemu.confauto_dump_path/myapp/qemu/dump