- 论坛徽章:
- 0
|
#数据库服务器必须为suse10-64bit
l_server_ip_list=$(read_file $silence_conf "SERVERS_IP_LIST" | sed "s/[()]//g")
l_server_ip_list=(${l_server_ip_list})
l_server_pwd_list=$(read_file $silence_conf "SERVERS_PWD_LIST" | sed "s/[()]//g")
l_server_pwd_list=(${l_server_pwd_list})
for (( l_index=0; l_index < ${#l_server_ip_list[*]}; l_index++ ))
do
l_tmp_ip=${l_server_ip_list[l_index]}
l_tmp_pwd=${l_server_pwd_list[l_index]}
for l_db in $(grep "DB_.*_IP[[:space:]]*=[[:space:]]*${l_tmp_ip}" $silence_conf | awk -F_ '{print $2}')
do
tmp_value=$(read_file $silence_conf "DB_${l_db}_ENABLE")
tmp_value=$(trim_space "$tmp_value" "lrs")
if [ "$tmp_value" == "1" ]; then
#build_expect_file "${l_tmp_ip}" "${l_tmp_pwd}" "cat /etc/issue | grep 'SUSE' | awk '{print \"SYS_RESULT:\" \$7,\$9}'"
build_expect_file "${l_tmp_ip}" "${l_tmp_pwd}" "cat /etc/issue | grep 'SUSE'"
/usr/bin/expect -f expect.tmp >./sys_info.tmp
rm -f expect.tmp
l_tmp=$(grep "Welcome to SUSE" ./sys_info.tmp | awk '{if ( $0 ~ /10.*\(x86_64\)/ ) print 0; else print 1}')
rm -f ./sys_info.tmp
if [ "$l_tmp" != "0" ]; then
# 首次出现检查出异常需要换行输出
if [ ${l_has_err} -eq 0 ]; then
echo ""
fi
l_has_err=1
#echo "The DB SERVER ${l_tmp_ip} is not 64bit SuSE10 system!"
cfont -red "The system should be SuSE10(64 bit) on ${l_tmp_ip} where the ${l_db} DB is installed." -reset
echo ""
l_system_version=1
#exit 1
fi
break;
fi
done
done
if [ ${l_system_version} -eq 1 ]; then
exit 1
fi |
|