添加qemu虚拟机判断
因为现在很多用户都是虚拟机双软路由,所以基本都是qemu虚拟机,将识别为“qemu”机型,而不能下载更新
This commit is contained in:
@@ -17,6 +17,10 @@ wget -P /tmp https://ghproxy.com/https://raw.githubusercontent.com/klever1988/na
|
|||||||
chmod +x /tmp/truncate /tmp/ddnz
|
chmod +x /tmp/truncate /tmp/ddnz
|
||||||
|
|
||||||
board_id=$(cat /etc/board.json | jsonfilter -e '@["model"].id' | sed 's/friendly.*,nanopi-//;s/xunlong,orangepi-//;s/^r1s-h5$/r1s/;s/^r1$/r1s-h3/;s/^r1-plus$/r1p/')
|
board_id=$(cat /etc/board.json | jsonfilter -e '@["model"].id' | sed 's/friendly.*,nanopi-//;s/xunlong,orangepi-//;s/^r1s-h5$/r1s/;s/^r1$/r1s-h3/;s/^r1-plus$/r1p/')
|
||||||
|
if [[ $board_id =~ .*qemu.* ]]; then
|
||||||
|
echo -e '\e[91m当前环境为qemu虚拟机,默认下载x86固件\e[0m'
|
||||||
|
board_id=x86
|
||||||
|
fi
|
||||||
mount -t tmpfs -o remount,size=850m tmpfs /tmp
|
mount -t tmpfs -o remount,size=850m tmpfs /tmp
|
||||||
rm -rf /tmp/upg && mkdir /tmp/upg && cd /tmp/upg
|
rm -rf /tmp/upg && mkdir /tmp/upg && cd /tmp/upg
|
||||||
set +e
|
set +e
|
||||||
|
|||||||
Reference in New Issue
Block a user