diff --git a/homeproxy/root/etc/homeproxy/scripts/generate_client.uc b/homeproxy/root/etc/homeproxy/scripts/generate_client.uc index 44f988f9..a766db1b 100755 --- a/homeproxy/root/etc/homeproxy/scripts/generate_client.uc +++ b/homeproxy/root/etc/homeproxy/scripts/generate_client.uc @@ -346,8 +346,8 @@ function generate_outbound(node) { max_early_data: strToInt(node.websocket_early_data), early_data_header_name: node.websocket_early_data_header, service_name: node.grpc_servicename, - idle_timeout: (node.http_idle_timeout), - ping_timeout: (node.http_ping_timeout), + idle_timeout: strToTime(node.http_idle_timeout), + ping_timeout: strToTime(node.http_ping_timeout), permit_without_stream: strToBool(node.grpc_permit_without_stream) } : null, udp_over_tcp: (node.udp_over_tcp === '1') ? { diff --git a/luci-app-amlogic/Makefile b/luci-app-amlogic/Makefile index a7f61762..c62a364d 100644 --- a/luci-app-amlogic/Makefile +++ b/luci-app-amlogic/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-amlogic -PKG_VERSION:=3.1.316 +PKG_VERSION:=3.1.318 PKG_RELEASE:=2 PKG_LICENSE:=GPL-2.0 License diff --git a/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner b/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner index a0c3bbe9..a1bb2da5 100755 --- a/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner +++ b/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner @@ -125,23 +125,23 @@ elif [ $(ls *.img -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then elif [ $(ls *.img.xz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then xz_file=$(ls *.img.xz | head -n 1) echo -e "Update using [ ${xz_file} ] file. Please wait a moment ..." - xz -d ${xz_file} 2>/dev/null + xz -d "${xz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.img.gz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.img.gz | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - gzip -df ${gz_file} 2>/dev/null + gzip -df "${gz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.7z -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.7z | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - bsdtar -xmf ${gz_file} 2>/dev/null - [ $? -eq 0 ] || 7z x ${gz_file} -aoa -y 2>/dev/null + bsdtar -xmf "${gz_file}" 2>/dev/null + [ $? -eq 0 ] || 7z x "${gz_file}" -aoa -y 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.zip -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then zip_file=$(ls *.zip | head -n 1) echo -e "Update using [ ${zip_file} ] file. Please wait a moment ..." - unzip -o ${zip_file} 2>/dev/null + unzip -o "${zip_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) else echo -e "Please upload or specify the update openwrt firmware file." diff --git a/luci-app-amlogic/root/usr/sbin/openwrt-update-amlogic b/luci-app-amlogic/root/usr/sbin/openwrt-update-amlogic index 467416d5..d381d70c 100755 --- a/luci-app-amlogic/root/usr/sbin/openwrt-update-amlogic +++ b/luci-app-amlogic/root/usr/sbin/openwrt-update-amlogic @@ -118,23 +118,23 @@ elif [ $(ls *.img -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then elif [ $(ls *.img.xz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then xz_file=$(ls *.img.xz | head -n 1) echo -e "Update using [ ${xz_file} ] file. Please wait a moment ..." - xz -d ${xz_file} 2>/dev/null + xz -d "${xz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.img.gz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.img.gz | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - gzip -df ${gz_file} 2>/dev/null + gzip -df "${gz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.7z -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.7z | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - bsdtar -xmf ${gz_file} 2>/dev/null - [ $? -eq 0 ] || 7z x ${gz_file} -aoa -y 2>/dev/null + bsdtar -xmf "${gz_file}" 2>/dev/null + [ $? -eq 0 ] || 7z x "${gz_file}" -aoa -y 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.zip -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then zip_file=$(ls *.zip | head -n 1) echo -e "Update using [ ${zip_file} ] file. Please wait a moment ..." - unzip -o ${zip_file} 2>/dev/null + unzip -o "${zip_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) else echo -e "Please upload or specify the update openwrt firmware file." diff --git a/luci-app-amlogic/root/usr/sbin/openwrt-update-kvm b/luci-app-amlogic/root/usr/sbin/openwrt-update-kvm index 0f81c320..0dbed087 100755 --- a/luci-app-amlogic/root/usr/sbin/openwrt-update-kvm +++ b/luci-app-amlogic/root/usr/sbin/openwrt-update-kvm @@ -146,23 +146,23 @@ elif [ $(ls *.img -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then elif [ $(ls *.img.xz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then xz_file=$(ls *.img.xz | head -n 1) echo -e "Update using [ ${xz_file} ] file. Please wait a moment ..." - xz -d ${xz_file} 2>/dev/null + xz -d "${xz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.img.gz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.img.gz | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - gzip -df ${gz_file} 2>/dev/null + gzip -df "${gz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.7z -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.7z | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - bsdtar -xmf ${gz_file} 2>/dev/null - [ $? -eq 0 ] || 7z x ${gz_file} -aoa -y 2>/dev/null + bsdtar -xmf "${gz_file}" 2>/dev/null + [ $? -eq 0 ] || 7z x "${gz_file}" -aoa -y 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.zip -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then zip_file=$(ls *.zip | head -n 1) echo -e "Update using [ ${zip_file} ] file. Please wait a moment ..." - unzip -o ${zip_file} 2>/dev/null + unzip -o "${zip_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) else echo -e "Please upload or specify the update openwrt firmware file." diff --git a/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip b/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip index 682c4463..da6fe93f 100755 --- a/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip +++ b/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip @@ -362,23 +362,23 @@ elif [ $(ls *.img -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then elif [ $(ls *.img.xz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then xz_file=$(ls *.img.xz | head -n 1) echo -e "Update using [ ${xz_file} ] file. Please wait a moment ..." - xz -d ${xz_file} 2>/dev/null + xz -d "${xz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.img.gz -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.img.gz | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - gzip -df ${gz_file} 2>/dev/null + gzip -df "${gz_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.7z -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then gz_file=$(ls *.7z | head -n 1) echo -e "Update using [ ${gz_file} ] file. Please wait a moment ..." - bsdtar -xmf ${gz_file} 2>/dev/null - [ $? -eq 0 ] || 7z x ${gz_file} -aoa -y 2>/dev/null + bsdtar -xmf "${gz_file}" 2>/dev/null + [ $? -eq 0 ] || 7z x "${gz_file}" -aoa -y 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) elif [ $(ls *.zip -l 2>/dev/null | grep "^-" | wc -l) -ge 1 ]; then zip_file=$(ls *.zip | head -n 1) echo -e "Update using [ ${zip_file} ] file. Please wait a moment ..." - unzip -o ${zip_file} 2>/dev/null + unzip -o "${zip_file}" 2>/dev/null IMG_NAME=$(ls *.img | head -n 1) else echo -e "Please upload or specify the update openwrt firmware file." diff --git a/luci-app-amlogic/root/usr/share/rpcd/ucode/luci.amlogic b/luci-app-amlogic/root/usr/share/rpcd/ucode/luci.amlogic index 0e373aac..2343ad46 100644 --- a/luci-app-amlogic/root/usr/share/rpcd/ucode/luci.amlogic +++ b/luci-app-amlogic/root/usr/share/rpcd/ucode/luci.amlogic @@ -93,15 +93,12 @@ function root_on_internal_storage() { const root_pt = trim(sh("df / | tail -n1 | awk '{print $1}' | awk -F '/' '{print $3}'")); if (!root_pt) return false; - if (match(root_pt, /^mmcblk[0-9]+p[0-9]+$/) || match(root_pt, /^nvme[0-9]+n[0-9]+p[0-9]+$/)) { - // eMMC and NVMe are always internal - return true; - } - if (match(root_pt, /^[hsv]d[a-z][0-9]+$/)) { - // Strip partition digit(s) to get base device (e.g. sda2 → sda); check removable flag. - const base_dev = replace(root_pt, /[0-9]+$/, ''); - const removable = trim(sh('cat /sys/block/' + shq(base_dev) + '/removable 2>/dev/null')); - return (removable == '0'); // 0 = internal SATA; 1 = USB/removable + // Only hide the install menu when root is already on eMMC (device/type == "MMC"). + // All other boot media (TF/SD, NVMe, SATA, USB) should still show the install menu. + if (match(root_pt, /^mmcblk[0-9]+p[0-9]+$/)) { + const base_dev = replace(root_pt, /p[0-9]+$/, ''); // e.g. mmcblk1p2 → mmcblk1 + const mmc_type = trim(sh('cat /sys/block/' + shq(base_dev) + '/device/type 2>/dev/null')); + return (mmc_type == 'MMC'); } return false; }