From 6d1082dcc0ba3b6be8abfc0bd5718cf7c61c6872 Mon Sep 17 00:00:00 2001 From: Licardo <1014660822@qq.com> Date: Fri, 30 Jul 2021 00:30:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0qemu=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E6=9C=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 因为现在很多用户都是虚拟机双软路由,所以基本都是qemu虚拟机,将识别为“qemu”机型,而不能下载更新 --- scripts/autoupdate.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/autoupdate.sh b/scripts/autoupdate.sh index ead1981..9b01637 100644 --- a/scripts/autoupdate.sh +++ b/scripts/autoupdate.sh @@ -17,6 +17,10 @@ wget -P /tmp https://ghproxy.com/https://raw.githubusercontent.com/klever1988/na 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/') +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 rm -rf /tmp/upg && mkdir /tmp/upg && cd /tmp/upg set +e