From 261a056567ba0e15e5ca446992abaede48bcc536 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 23 Oct 2021 22:09:15 +0800 Subject: [PATCH] fix --- scripts/autoupdate-bash.sh | 8 ++++---- scripts/merge_packages.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/autoupdate-bash.sh b/scripts/autoupdate-bash.sh index 64ae4a7..f3a8d4d 100644 --- a/scripts/autoupdate-bash.sh +++ b/scripts/autoupdate-bash.sh @@ -40,7 +40,7 @@ if [ $md5r != $md5sum ]; then fi mv $board_id.img FriendlyWrt.img -[ $board_id = 'x86' ] && drive='sda' || drive='mmcblk0' +[ $board_id == 'x86' ] && drive='sda' || drive='mmcblk0' bs=`expr $(cat /sys/block/$drive/size) \* 512` truncate -s $bs FriendlyWrt.img || ../truncate -s $bs FriendlyWrt.img echo ", +" | sfdisk -N 2 FriendlyWrt.img @@ -55,8 +55,8 @@ cd /mnt/img sysupgrade -b back.tar.gz tar zxf back.tar.gz 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 +opkg list-installed | grep "luci-i18n\|luci-app" | cut -d\ -f1 | sort -r | xargs -n1 echo opkg install --force-overwrite >> packages_needed +[ x$ver == 'x-slim' ] && sed -i '/exit/i\sed -i "/packages_needed/d" /etc/rc.local; [ -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' rm etc/config/network; @@ -79,7 +79,7 @@ if [ -f FriendlyWrt.img ]; then echo 1 > /proc/sys/kernel/sysrq echo u > /proc/sysrq-trigger && umount / || true #pv FriendlyWrt.img | dd of=/dev/mmcblk0 conv=fsync - dd if=FriendlyWrt.img of=/dev/$drive conv=sparse status=progress bs=1M + dd if=FriendlyWrt.img of=/dev/$drive oflag=direct conv=sparse status=progress bs=1M echo -e '\e[92m刷机完毕,正在重启...\e[0m' echo b > /proc/sysrq-trigger fi diff --git a/scripts/merge_packages.sh b/scripts/merge_packages.sh index 34b1cb6..7dcb8d7 100644 --- a/scripts/merge_packages.sh +++ b/scripts/merge_packages.sh @@ -38,6 +38,7 @@ merge_package https://github.com/coolsnowwolf/lede/trunk/package/lean/ntfs3-moun merge_package https://github.com/coolsnowwolf/lede/trunk/package/lean/ntfs3 merge_package https://github.com/coolsnowwolf/lede/trunk/package/lean/uugamebooster merge_package https://github.com/coolsnowwolf/lede/trunk/package/lean/luci-app-uugamebooster +merge_package https://github.com/kuoruan/openwrt-frp frp merge_package https://github.com/kuoruan/luci-app-frpc merge_package https://github.com/small-5/luci-app-adblock-plus merge_package https://github.com/zxlhhyccc/luci-app-v2raya