From 5538f4131562bc4963d3e4f7794a661db2a83711 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 23 Oct 2021 00:17:48 +0800 Subject: [PATCH] autoupdate-bash --- scripts/autoupdate-bash.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/autoupdate-bash.sh b/scripts/autoupdate-bash.sh index 0d7c67e..64ae4a7 100644 --- a/scripts/autoupdate-bash.sh +++ b/scripts/autoupdate-bash.sh @@ -54,7 +54,8 @@ sleep 10 cd /mnt/img sysupgrade -b back.tar.gz tar zxf back.tar.gz -opkg list-installed | grep "luci-i18n\|luci-app" | cut -d\ -f1 | sort -r | xargs -n1 echo opkg install > packages_needed +echo 'opkg update' > packages_needed +opkg list-installed | grep "luci-i18n\|luci-app" | cut -d\ -f1 | sort -r | xargs -n1 echo opkg install >> packages_needed sed -i '/exit/i\[ -e /packages_needed ] && (mv /packages_needed /packages_needed.installed && sh /packages_needed.installed)\' /etc/rc.local if ! grep -q macaddr /etc/config/network; then echo -e '\e[91m注意:由于已知的问题,“网络接口”配置无法继承,重启后需要重新设置WAN拨号和LAN网段信息\e[0m'