fix(master : nicsensor)优化try_get_server_type函数
This commit is contained in:
parent
a49c474ee5
commit
3710481735
@ -259,6 +259,12 @@ try_get_server_type(){
|
|||||||
else
|
else
|
||||||
boardid=`cat /proc/cmdline | awk -F 'boardid=' '{split($2, a," "); print a[1]}'`
|
boardid=`cat /proc/cmdline | awk -F 'boardid=' '{split($2, a," "); print a[1]}'`
|
||||||
|
|
||||||
|
if [ "$boardid" = "" ];then
|
||||||
|
server_type="Unknown"
|
||||||
|
format_print $WARNING "Can't find boardid, auto work failed"
|
||||||
|
format_print $INFO "Please modify server_type in script manually!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
if [ $boardid -eq 130 ];then
|
if [ $boardid -eq 130 ];then
|
||||||
server_type="5280m7"
|
server_type="5280m7"
|
||||||
elif [ $boardid -eq 150 ];then
|
elif [ $boardid -eq 150 ];then
|
||||||
@ -267,7 +273,7 @@ try_get_server_type(){
|
|||||||
server_type="5688m7"
|
server_type="5688m7"
|
||||||
else
|
else
|
||||||
format_print $ERROR "Invalid boardid value: $boardid"
|
format_print $ERROR "Invalid boardid value: $boardid"
|
||||||
format_print $ERROR "Can't specify server type by general method"
|
format_print $ERROR "Can't specify server type by auto method"
|
||||||
format_print $INFO "Please modify server_type in script manually!"
|
format_print $INFO "Please modify server_type in script manually!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user