diff --git a/README.md b/README.md index b57de93e..115129b7 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ # If it does not involve adding or deleting, the following process is not required. sudo apt install gettext git clone https://github.com/wjz304/arpl-i18n.git - cd arpl-i18n/files/board/arpl/overlayfs/opt/arpl + cd files/board/arpl/overlayfs/opt/arpl xgettext -L Shell --keyword=TEXT *.sh -o lang/arpl.pot sed -i 's/charset=CHARSET/charset=UTF-8/' lang/arpl.pot # You need to replace the language you need and translate the po file. diff --git a/files/board/arpl/overlayfs/opt/arpl/boot.sh b/files/board/arpl/overlayfs/opt/arpl/boot.sh index 1a674798..24a22864 100755 --- a/files/board/arpl/overlayfs/opt/arpl/boot.sh +++ b/files/board/arpl/overlayfs/opt/arpl/boot.sh @@ -38,7 +38,7 @@ if [ "$(sha256sum "${ORI_ZIMAGE_FILE}" | awk '{print$1}')" != "${ZIMAGE_HASH}" ] echo -e "\033[1;43m$(TEXT "DSM zImage changed")\033[0m" /opt/arpl/zimage-patch.sh if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "zImage not patched:\n")$(<"${LOG_FILE}")" 12 70 exit 1 fi @@ -51,7 +51,7 @@ if [ "${RAMDISK_HASH_CUR}" != "${RAMDISK_HASH}" ]; then echo -e "\033[1;43m$(TEXT "DSM Ramdisk changed")\033[0m" /opt/arpl/ramdisk-patch.sh if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "Ramdisk not patched:\n")$(<"${LOG_FILE}")" 12 70 exit 1 fi @@ -174,13 +174,11 @@ if [ "${DIRECT}" = "true" ]; then reboot exit 0 else - BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")" - [ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=10 ETHX=($(ls /sys/class/net/ | grep eth)) # real network cards list echo "$(printf "$(TEXT "Detected %s network cards.")" "${#ETHX[@]}")" echo "$(TEXT "Checking Connect.")" COUNT=0 - while [ ${COUNT} -lt ${BOOTIPWAIT} ]; do + while [ ${COUNT} -lt 32 ]; do hasConnect="false" for N in $(seq 0 $(expr ${#ETHX[@]} - 1)); do if ethtool ${ETHX[${N}]} | grep 'Link detected' | grep -q 'yes'; then @@ -224,6 +222,24 @@ else sleep 1 done done + BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")" + [ -z "${BOOTWAIT}" ] && BOOTWAIT=10 + w | awk '{print $1" "$2" "$4" "$5" "$6}' >WO + MSG="" + while test ${BOOTWAIT} -ge 0; do + MSG="$(printf "$(TEXT "%2ds (accessing arpl will interrupt boot)")" "${BOOTWAIT}")" + echo -en "\r${MSG}" + w | awk '{print $1" "$2" "$4" "$5" "$6}' >WC + if ! diff WO WC >/dev/null 2>&1; then + echo -en "\r$(TEXT "A new access is connected, the boot process is interrupted.")\n" + break + fi + sleep 1 + BOOTWAIT=$((BOOTWAIT - 1)) + done + rm -f WO WC + [ ${BOOTWAIT} -eq 0 ] && exit 0 + echo -en "\r$(printf "%${#MSG}s" " ")\n" fi echo -e "\033[1;37m$(TEXT "Loading DSM kernel...")\033[0m" diff --git a/files/board/arpl/overlayfs/opt/arpl/init.sh b/files/board/arpl/overlayfs/opt/arpl/init.sh index c1176172..23d4c066 100755 --- a/files/board/arpl/overlayfs/opt/arpl/init.sh +++ b/files/board/arpl/overlayfs/opt/arpl/init.sh @@ -78,7 +78,7 @@ if [ ! -f "${USER_CONFIG_FILE}" ]; then writeConfigKey "dsmlogo" "true" "${USER_CONFIG_FILE}" writeConfigKey "directboot" "false" "${USER_CONFIG_FILE}" writeConfigKey "notsetmacs" "false" "${USER_CONFIG_FILE}" - writeConfigKey "bootipwait" "10" "${USER_CONFIG_FILE}" + writeConfigKey "bootwait" "10" "${USER_CONFIG_FILE}" writeConfigKey "kernelway" "power" "${USER_CONFIG_FILE}" writeConfigKey "model" "" "${USER_CONFIG_FILE}" writeConfigKey "productver" "" "${USER_CONFIG_FILE}" diff --git a/files/board/arpl/overlayfs/opt/arpl/lang/arpl.pot b/files/board/arpl/overlayfs/opt/arpl/lang/arpl.pot index ac521d67..a8b2fa3d 100644 --- a/files/board/arpl/overlayfs/opt/arpl/lang/arpl.pot +++ b/files/board/arpl/overlayfs/opt/arpl/lang/arpl.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-24 20:08+0800\n" +"POT-Creation-Date: 2023-09-01 08:27+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -89,47 +89,55 @@ msgstr "" msgid "Reboot to boot directly in DSM" msgstr "" -#: boot.sh:180 init.sh:179 +#: boot.sh:178 init.sh:179 msgid "Detected %s network cards." msgstr "" -#: boot.sh:181 init.sh:180 +#: boot.sh:179 init.sh:180 msgid "Checking Connect." msgstr "" -#: boot.sh:199 +#: boot.sh:197 msgid "Waiting IP.(For reference only)" msgstr "" -#: boot.sh:206 init.sh:205 +#: boot.sh:204 init.sh:205 msgid "DOWN" msgstr "" -#: boot.sh:210 init.sh:209 +#: boot.sh:208 init.sh:209 msgid "NOT CONNECTED" msgstr "" -#: boot.sh:214 init.sh:213 +#: boot.sh:212 init.sh:213 msgid "TIMEOUT" msgstr "" -#: boot.sh:220 +#: boot.sh:218 msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web." msgstr "" -#: boot.sh:229 +#: boot.sh:230 +msgid "%2ds (accessing arpl will interrupt boot)" +msgstr "" + +#: boot.sh:234 +msgid "A new access is connected, the boot process is interrupted." +msgstr "" + +#: boot.sh:245 msgid "Loading DSM kernel..." msgstr "" -#: boot.sh:233 +#: boot.sh:249 msgid "Warning, running kexec with --noefi param, strange things will happen!!" msgstr "" -#: boot.sh:238 +#: boot.sh:254 msgid "Booting..." msgstr "" -#: boot.sh:240 +#: boot.sh:256 msgid "" "[This interface will not be operational. Please use the http://find.synology." "com/ find DSM and connect.]" @@ -265,7 +273,7 @@ msgstr "" msgid "Reconfiguring Synoinfo, Addons and Modules" msgstr "" -#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1700 +#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1712 msgid "Choose a option" msgstr "" @@ -289,8 +297,8 @@ msgstr "" msgid "Upload a external addon" msgstr "" -#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1708 -#: menu.sh:1876 menu.sh:1944 +#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1709 +#: menu.sh:1880 menu.sh:1948 msgid "Exit" msgstr "" @@ -320,7 +328,7 @@ msgstr "" msgid "Select addon to remove" msgstr "" -#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1790 +#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1794 msgid "This feature is only available when accessed via web/ssh." msgstr "" @@ -328,7 +336,7 @@ msgstr "" msgid "Please upload the *.addons file." msgstr "" -#: menu.sh:373 menu.sh:526 menu.sh:1817 menu.sh:1831 +#: menu.sh:373 menu.sh:526 menu.sh:1821 menu.sh:1835 msgid "Not a valid file, please try again!" msgstr "" @@ -622,7 +630,7 @@ msgstr "" msgid "Addon %s not found!" msgstr "" -#: menu.sh:979 menu.sh:1927 +#: menu.sh:979 menu.sh:1931 msgid "Cleaning" msgstr "" @@ -639,7 +647,7 @@ msgid "Switch direct boot:" msgstr "" #: menu.sh:999 -msgid "Time of timeout of wait ip in boot:" +msgid "Timeout of boot wait:" msgstr "" #: menu.sh:1000 @@ -714,7 +722,7 @@ msgstr "" msgid "Advanced" msgstr "" -#: menu.sh:1026 menu.sh:1879 +#: menu.sh:1026 menu.sh:1883 msgid "Choose the option" msgstr "" @@ -914,7 +922,7 @@ msgstr "" msgid "Config changed, would you like to rebuild the loader?" msgstr "" -#: menu.sh:1505 menu.sh:1870 +#: menu.sh:1505 menu.sh:1874 msgid "Choose a language" msgstr "" @@ -926,9 +934,9 @@ msgstr "" msgid "Choice a keymap" msgstr "" -#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1713 menu.sh:1717 -#: menu.sh:1721 menu.sh:1725 menu.sh:1733 menu.sh:1741 menu.sh:1749 -#: menu.sh:1757 +#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1717 menu.sh:1721 +#: menu.sh:1725 menu.sh:1729 menu.sh:1737 menu.sh:1745 menu.sh:1753 +#: menu.sh:1761 msgid "Update %s" msgstr "" @@ -990,23 +998,23 @@ msgstr "" msgid "%s updated with success!" msgstr "" -#: menu.sh:1701 +#: menu.sh:1700 msgid "Update all" msgstr "" -#: menu.sh:1702 +#: menu.sh:1701 msgid "Update arpl" msgstr "" -#: menu.sh:1703 +#: menu.sh:1702 msgid "Update addons" msgstr "" -#: menu.sh:1704 +#: menu.sh:1703 msgid "Update modules" msgstr "" -#: menu.sh:1705 +#: menu.sh:1704 msgid "Update LKMs" msgstr "" @@ -1014,129 +1022,129 @@ msgstr "" msgid "Set proxy server" msgstr "" -#: menu.sh:1707 +#: menu.sh:1708 msgid "Local upload" msgstr "" -#: menu.sh:1713 menu.sh:1741 +#: menu.sh:1717 menu.sh:1745 msgid "addons" msgstr "" -#: menu.sh:1717 menu.sh:1749 +#: menu.sh:1721 menu.sh:1753 msgid "modules" msgstr "" -#: menu.sh:1721 menu.sh:1757 +#: menu.sh:1725 menu.sh:1761 msgid "LKMs" msgstr "" -#: menu.sh:1725 menu.sh:1733 +#: menu.sh:1729 menu.sh:1737 msgid "arpl" msgstr "" -#: menu.sh:1767 menu.sh:1778 menu.sh:1789 menu.sh:1799 menu.sh:1816 -#: menu.sh:1830 +#: menu.sh:1771 menu.sh:1782 menu.sh:1793 menu.sh:1803 menu.sh:1820 +#: menu.sh:1834 msgid "Update" msgstr "" -#: menu.sh:1768 +#: menu.sh:1772 msgid "Please enter a proxy server url" msgstr "" -#: menu.sh:1779 +#: menu.sh:1783 msgid "Invalid proxy server url, continue?" msgstr "" -#: menu.sh:1794 +#: menu.sh:1798 msgid "" "Please keep the attachment name consistent with the attachment name on " "Github.\\n" msgstr "" -#: menu.sh:1795 +#: menu.sh:1799 msgid "Upload update.zip will update arpl.\\n" msgstr "" -#: menu.sh:1796 +#: menu.sh:1800 msgid "Upload addons.zip will update Addons.\\n" msgstr "" -#: menu.sh:1797 +#: menu.sh:1801 msgid "Upload modules.zip will update Modules.\\n" msgstr "" -#: menu.sh:1798 +#: menu.sh:1802 msgid "Upload rp-lkms.zip will update LKMs.\\n" msgstr "" -#: menu.sh:1851 +#: menu.sh:1855 msgid "Choose a model" msgstr "" -#: menu.sh:1853 +#: menu.sh:1857 msgid "Choose a version" msgstr "" -#: menu.sh:1855 +#: menu.sh:1859 msgid "Addons menu" msgstr "" -#: menu.sh:1856 +#: menu.sh:1860 msgid "Modules menu" msgstr "" -#: menu.sh:1857 +#: menu.sh:1861 msgid "Cmdline menu" msgstr "" -#: menu.sh:1858 +#: menu.sh:1862 msgid "Synoinfo menu" msgstr "" -#: menu.sh:1861 +#: menu.sh:1865 msgid "Advanced menu" msgstr "" -#: menu.sh:1864 +#: menu.sh:1868 msgid "Build the loader" msgstr "" -#: menu.sh:1868 +#: menu.sh:1872 msgid "Boot the loader" msgstr "" -#: menu.sh:1871 +#: menu.sh:1875 msgid "Choose a keymap" msgstr "" -#: menu.sh:1873 +#: menu.sh:1877 msgid "Clean disk cache" msgstr "" -#: menu.sh:1875 +#: menu.sh:1879 msgid "Update menu" msgstr "" -#: menu.sh:1939 +#: menu.sh:1943 msgid "Choose a action" msgstr "" -#: menu.sh:1940 +#: menu.sh:1944 msgid "Poweroff" msgstr "" -#: menu.sh:1941 +#: menu.sh:1945 msgid "Reboot" msgstr "" -#: menu.sh:1942 +#: menu.sh:1946 msgid "Reboot to arpl" msgstr "" -#: menu.sh:1943 +#: menu.sh:1947 msgid "Back to shell" msgstr "" -#: menu.sh:1969 +#: menu.sh:1973 msgid "Call \\033[1;32mmenu.sh\\033[0m to return to menu" msgstr "" diff --git a/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.mo b/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.mo index 941d7b6f..83d619c9 100644 Binary files a/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.mo and b/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.mo differ diff --git a/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.po b/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.po index f38c36a4..0da35a5e 100644 --- a/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.po +++ b/files/board/arpl/overlayfs/opt/arpl/lang/zh_CN.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: arpl-i18n\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-24 20:08+0800\n" -"PO-Revision-Date: 2023-08-24 20:09+0800\n" +"POT-Creation-Date: 2023-09-01 08:27+0800\n" +"PO-Revision-Date: 2023-09-01 08:27+0800\n" "Last-Translator: ing \n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" @@ -88,47 +88,55 @@ msgstr "Cmdline:\\n" msgid "Reboot to boot directly in DSM" msgstr "重启并直接进入DSM引导" -#: boot.sh:180 init.sh:179 +#: boot.sh:178 init.sh:179 msgid "Detected %s network cards." msgstr "检测到 %s 个网卡." -#: boot.sh:181 init.sh:180 +#: boot.sh:179 init.sh:180 msgid "Checking Connect." msgstr "检查连接." -#: boot.sh:199 +#: boot.sh:197 msgid "Waiting IP.(For reference only)" msgstr "获取 IP.(仅供参考)" -#: boot.sh:206 init.sh:205 +#: boot.sh:204 init.sh:205 msgid "DOWN" msgstr "关闭" -#: boot.sh:210 init.sh:209 +#: boot.sh:208 init.sh:209 msgid "NOT CONNECTED" msgstr "未连接" -#: boot.sh:214 init.sh:213 +#: boot.sh:212 init.sh:213 msgid "TIMEOUT" msgstr "超时" -#: boot.sh:220 +#: boot.sh:218 msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web." msgstr "在浏览器中访问 \\033[1;34mhttp://%s:5000\\033[0m 链接 DSM." -#: boot.sh:229 +#: boot.sh:230 +msgid "%2ds (accessing arpl will interrupt boot)" +msgstr "访问arpl将中断启动" + +#: boot.sh:234 +msgid "A new access is connected, the boot process is interrupted." +msgstr "新的连接, 启动过程被中断." + +#: boot.sh:245 msgid "Loading DSM kernel..." msgstr "加载 DSM kernel..." -#: boot.sh:233 +#: boot.sh:249 msgid "Warning, running kexec with --noefi param, strange things will happen!!" msgstr "警告, 使用'--noefi'参数运行'kexec', 可能有不好的事情发生!!" -#: boot.sh:238 +#: boot.sh:254 msgid "Booting..." msgstr "引导中..." -#: boot.sh:240 +#: boot.sh:256 msgid "" "[This interface will not be operational. Please use the http://find.synology." "com/ find DSM and connect.]" @@ -264,7 +272,7 @@ msgstr "获取pat数据成功,\\n请确认或者按需修改." msgid "Reconfiguring Synoinfo, Addons and Modules" msgstr "重新配置 Syninfo, 插件和模块" -#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1700 +#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1712 msgid "Choose a option" msgstr "设置" @@ -288,8 +296,8 @@ msgstr "显示所有可用插件" msgid "Upload a external addon" msgstr "上传外部插件" -#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1708 -#: menu.sh:1876 menu.sh:1944 +#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1709 +#: menu.sh:1880 menu.sh:1948 msgid "Exit" msgstr "退出" @@ -319,7 +327,7 @@ msgstr "没有要删除的用户插件" msgid "Select addon to remove" msgstr "选择要删除的插件" -#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1790 +#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1794 msgid "This feature is only available when accessed via web/ssh." msgstr "此功能仅通过web/ssh访问时可用." @@ -327,7 +335,7 @@ msgstr "此功能仅通过web/ssh访问时可用." msgid "Please upload the *.addons file." msgstr "请上传 *.addons 文件." -#: menu.sh:373 menu.sh:526 menu.sh:1817 menu.sh:1831 +#: menu.sh:373 menu.sh:526 menu.sh:1821 menu.sh:1835 msgid "Not a valid file, please try again!" msgstr "不是有效的文件, 请重试!" @@ -626,7 +634,7 @@ msgstr "拷贝文件: " msgid "Addon %s not found!" msgstr "插件 %s 未找到!" -#: menu.sh:979 menu.sh:1927 +#: menu.sh:979 menu.sh:1931 msgid "Cleaning" msgstr "清除中" @@ -643,8 +651,8 @@ msgid "Switch direct boot:" msgstr "切换直接启动:" #: menu.sh:999 -msgid "Time of timeout of wait ip in boot:" -msgstr "启动时获取IP的超时时间:" +msgid "Timeout of boot wait:" +msgstr "启动超时时间:" #: menu.sh:1000 msgid "kernel switching method:" @@ -718,7 +726,7 @@ msgstr "显示 dsm logo:" msgid "Advanced" msgstr "高级" -#: menu.sh:1026 menu.sh:1879 +#: menu.sh:1026 menu.sh:1883 msgid "Choose the option" msgstr "设置" @@ -920,7 +928,7 @@ msgstr "警告" msgid "Config changed, would you like to rebuild the loader?" msgstr "配置已更改, 是否重新编译引导?" -#: menu.sh:1505 menu.sh:1870 +#: menu.sh:1505 menu.sh:1874 msgid "Choose a language" msgstr "选择语言" @@ -932,9 +940,9 @@ msgstr "选择布局" msgid "Choice a keymap" msgstr "选择键盘" -#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1713 menu.sh:1717 -#: menu.sh:1721 menu.sh:1725 menu.sh:1733 menu.sh:1741 menu.sh:1749 -#: menu.sh:1757 +#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1717 menu.sh:1721 +#: menu.sh:1725 menu.sh:1729 menu.sh:1737 menu.sh:1745 menu.sh:1753 +#: menu.sh:1761 msgid "Update %s" msgstr "更新 %s" @@ -996,23 +1004,23 @@ msgstr "安装新 %s 中" msgid "%s updated with success!" msgstr "%s 更新成功!" -#: menu.sh:1701 +#: menu.sh:1700 msgid "Update all" msgstr "更新所有" -#: menu.sh:1702 +#: menu.sh:1701 msgid "Update arpl" msgstr "更新arpl" -#: menu.sh:1703 +#: menu.sh:1702 msgid "Update addons" msgstr "更新插件" -#: menu.sh:1704 +#: menu.sh:1703 msgid "Update modules" msgstr "更新模块" -#: menu.sh:1705 +#: menu.sh:1704 msgid "Update LKMs" msgstr "更新LKMs" @@ -1020,129 +1028,129 @@ msgstr "更新LKMs" msgid "Set proxy server" msgstr "设置代理" -#: menu.sh:1707 +#: menu.sh:1708 msgid "Local upload" msgstr "本地上传" -#: menu.sh:1713 menu.sh:1741 +#: menu.sh:1717 menu.sh:1745 msgid "addons" msgstr "插件" -#: menu.sh:1717 menu.sh:1749 +#: menu.sh:1721 menu.sh:1753 msgid "modules" msgstr "模块" -#: menu.sh:1721 menu.sh:1757 +#: menu.sh:1725 menu.sh:1761 msgid "LKMs" msgstr "LKMs" -#: menu.sh:1725 menu.sh:1733 +#: menu.sh:1729 menu.sh:1737 msgid "arpl" msgstr "arpl" -#: menu.sh:1767 menu.sh:1778 menu.sh:1789 menu.sh:1799 menu.sh:1816 -#: menu.sh:1830 +#: menu.sh:1771 menu.sh:1782 menu.sh:1793 menu.sh:1803 menu.sh:1820 +#: menu.sh:1834 msgid "Update" msgstr "更新" -#: menu.sh:1768 +#: menu.sh:1772 msgid "Please enter a proxy server url" msgstr "请输入代理服务器url" -#: menu.sh:1779 +#: menu.sh:1783 msgid "Invalid proxy server url, continue?" msgstr "无效的代理服务器url, 是否继续?" -#: menu.sh:1794 +#: menu.sh:1798 msgid "" "Please keep the attachment name consistent with the attachment name on " "Github.\\n" msgstr "请保持附件名称与 github 上附件名称一致.\\n" -#: menu.sh:1795 +#: menu.sh:1799 msgid "Upload update.zip will update arpl.\\n" msgstr "上传 update.zip 将更新 arpl.\\n" -#: menu.sh:1796 +#: menu.sh:1800 msgid "Upload addons.zip will update Addons.\\n" msgstr "上传 addons.zip 将更新 插件.\\n" -#: menu.sh:1797 +#: menu.sh:1801 msgid "Upload modules.zip will update Modules.\\n" msgstr "上传 modules.zip 将更新 模块.\\n" -#: menu.sh:1798 +#: menu.sh:1802 msgid "Upload rp-lkms.zip will update LKMs.\\n" msgstr "上传 rp-lkms.zip 将更新 LKMs.\\n" -#: menu.sh:1851 +#: menu.sh:1855 msgid "Choose a model" msgstr "选择型号" -#: menu.sh:1853 +#: menu.sh:1857 msgid "Choose a version" msgstr "选择版本" -#: menu.sh:1855 +#: menu.sh:1859 msgid "Addons menu" msgstr "插件" -#: menu.sh:1856 +#: menu.sh:1860 msgid "Modules menu" msgstr "模块" -#: menu.sh:1857 +#: menu.sh:1861 msgid "Cmdline menu" msgstr "设置Cmdline" -#: menu.sh:1858 +#: menu.sh:1862 msgid "Synoinfo menu" msgstr "设置Synoinfo" -#: menu.sh:1861 +#: menu.sh:1865 msgid "Advanced menu" msgstr "高级设置" -#: menu.sh:1864 +#: menu.sh:1868 msgid "Build the loader" msgstr "编译引导" -#: menu.sh:1868 +#: menu.sh:1872 msgid "Boot the loader" msgstr "启动" -#: menu.sh:1871 +#: menu.sh:1875 msgid "Choose a keymap" msgstr "选择键盘" -#: menu.sh:1873 +#: menu.sh:1877 msgid "Clean disk cache" msgstr "清除磁盘缓存" -#: menu.sh:1875 +#: menu.sh:1879 msgid "Update menu" msgstr "更新" -#: menu.sh:1939 +#: menu.sh:1943 msgid "Choose a action" msgstr "选择动作" -#: menu.sh:1940 +#: menu.sh:1944 msgid "Poweroff" msgstr "关机" -#: menu.sh:1941 +#: menu.sh:1945 msgid "Reboot" msgstr "重启" -#: menu.sh:1942 +#: menu.sh:1946 msgid "Reboot to arpl" msgstr "重启到arpl" -#: menu.sh:1943 +#: menu.sh:1947 msgid "Back to shell" msgstr "退出到shell" -#: menu.sh:1969 +#: menu.sh:1973 msgid "Call \\033[1;32mmenu.sh\\033[0m to return to menu" msgstr "执行 \\033[1;32mmenu.sh\\033[0m 重新进入设置菜单" diff --git a/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.mo b/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.mo index 13c7a22e..541bbe24 100644 Binary files a/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.mo and b/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.mo differ diff --git a/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.po b/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.po index 27277f6d..c77ae2e7 100644 --- a/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.po +++ b/files/board/arpl/overlayfs/opt/arpl/lang/zh_HK.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: arpl-i18n\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-24 20:08+0800\n" -"PO-Revision-Date: 2023-08-24 20:09+0800\n" +"POT-Creation-Date: 2023-09-01 08:27+0800\n" +"PO-Revision-Date: 2023-09-01 08:27+0800\n" "Last-Translator: ing \n" "Language-Team: Chinese (HongKong) \n" "Language: zh_HK\n" @@ -88,47 +88,55 @@ msgstr "Cmdline:\\n" msgid "Reboot to boot directly in DSM" msgstr "重啓並直接進入DSM引導" -#: boot.sh:180 init.sh:179 +#: boot.sh:178 init.sh:179 msgid "Detected %s network cards." msgstr "檢測到 %s 個網卡." -#: boot.sh:181 init.sh:180 +#: boot.sh:179 init.sh:180 msgid "Checking Connect." msgstr "檢查連接." -#: boot.sh:199 +#: boot.sh:197 msgid "Waiting IP.(For reference only)" msgstr "獲取 IP.(僅供參考)" -#: boot.sh:206 init.sh:205 +#: boot.sh:204 init.sh:205 msgid "DOWN" msgstr "關閉" -#: boot.sh:210 init.sh:209 +#: boot.sh:208 init.sh:209 msgid "NOT CONNECTED" msgstr "未連接" -#: boot.sh:214 init.sh:213 +#: boot.sh:212 init.sh:213 msgid "TIMEOUT" msgstr "超時" -#: boot.sh:220 +#: boot.sh:218 msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web." msgstr "在瀏覽器中訪問 \\033[1;34mhttp://%s:5000\\033[0m 連結 DSM." -#: boot.sh:229 +#: boot.sh:230 +msgid "%2ds (accessing arpl will interrupt boot)" +msgstr "訪問arpl將中斷啟動" + +#: boot.sh:234 +msgid "A new access is connected, the boot process is interrupted." +msgstr "新的連接, 啟動過程被中斷." + +#: boot.sh:245 msgid "Loading DSM kernel..." msgstr "加載 DSM kernel..." -#: boot.sh:233 +#: boot.sh:249 msgid "Warning, running kexec with --noefi param, strange things will happen!!" msgstr "警告, 使用'--noefi'參數運行'kexec', 可能有不好的事情發生!!" -#: boot.sh:238 +#: boot.sh:254 msgid "Booting..." msgstr "引導中..." -#: boot.sh:240 +#: boot.sh:256 msgid "" "[This interface will not be operational. Please use the http://find.synology." "com/ find DSM and connect.]" @@ -264,7 +272,7 @@ msgstr "獲取pat數據成功,\\n請確認或者按需修改." msgid "Reconfiguring Synoinfo, Addons and Modules" msgstr "重新配寘 Syninfo, 挿件和模塊" -#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1700 +#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1712 msgid "Choose a option" msgstr "設定" @@ -288,8 +296,8 @@ msgstr "顯示所有可用挿件" msgid "Upload a external addon" msgstr "上傳外部挿件" -#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1708 -#: menu.sh:1876 menu.sh:1944 +#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1709 +#: menu.sh:1880 menu.sh:1948 msgid "Exit" msgstr "退出" @@ -319,7 +327,7 @@ msgstr "沒有要删除的用戶挿件" msgid "Select addon to remove" msgstr "選擇要删除的挿件" -#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1790 +#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1794 msgid "This feature is only available when accessed via web/ssh." msgstr "此功能僅通過web/ssh訪問時可用." @@ -327,7 +335,7 @@ msgstr "此功能僅通過web/ssh訪問時可用." msgid "Please upload the *.addons file." msgstr "請上傳 *.addons 檔案." -#: menu.sh:373 menu.sh:526 menu.sh:1817 menu.sh:1831 +#: menu.sh:373 menu.sh:526 menu.sh:1821 menu.sh:1835 msgid "Not a valid file, please try again!" msgstr "不是有效的檔案, 請重試!" @@ -626,7 +634,7 @@ msgstr "拷貝檔案: " msgid "Addon %s not found!" msgstr "挿件 %s 未找到!" -#: menu.sh:979 menu.sh:1927 +#: menu.sh:979 menu.sh:1931 msgid "Cleaning" msgstr "清除中" @@ -643,8 +651,8 @@ msgid "Switch direct boot:" msgstr "切換直接啟動:" #: menu.sh:999 -msgid "Time of timeout of wait ip in boot:" -msgstr "啟動時獲取IP的超時時間:" +msgid "Timeout of boot wait:" +msgstr "啟動超時時間:" #: menu.sh:1000 msgid "kernel switching method:" @@ -718,7 +726,7 @@ msgstr "顯示 dsm logo:" msgid "Advanced" msgstr "高級" -#: menu.sh:1026 menu.sh:1879 +#: menu.sh:1026 menu.sh:1883 msgid "Choose the option" msgstr "設定" @@ -920,7 +928,7 @@ msgstr "警告" msgid "Config changed, would you like to rebuild the loader?" msgstr "配寘已更改, 是否重新編譯引導?" -#: menu.sh:1505 menu.sh:1870 +#: menu.sh:1505 menu.sh:1874 msgid "Choose a language" msgstr "選擇語言" @@ -932,9 +940,9 @@ msgstr "選擇佈局" msgid "Choice a keymap" msgstr "選擇鍵盤" -#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1713 menu.sh:1717 -#: menu.sh:1721 menu.sh:1725 menu.sh:1733 menu.sh:1741 menu.sh:1749 -#: menu.sh:1757 +#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1717 menu.sh:1721 +#: menu.sh:1725 menu.sh:1729 menu.sh:1737 menu.sh:1745 menu.sh:1753 +#: menu.sh:1761 msgid "Update %s" msgstr "更新 %s" @@ -996,23 +1004,23 @@ msgstr "安裝新 %s 中" msgid "%s updated with success!" msgstr "%s 更新成功!" -#: menu.sh:1701 +#: menu.sh:1700 msgid "Update all" msgstr "更新所有" -#: menu.sh:1702 +#: menu.sh:1701 msgid "Update arpl" msgstr "更新arpl" -#: menu.sh:1703 +#: menu.sh:1702 msgid "Update addons" msgstr "更新挿件" -#: menu.sh:1704 +#: menu.sh:1703 msgid "Update modules" msgstr "更新模塊" -#: menu.sh:1705 +#: menu.sh:1704 msgid "Update LKMs" msgstr "更新LKMs" @@ -1020,129 +1028,129 @@ msgstr "更新LKMs" msgid "Set proxy server" msgstr "設定代理" -#: menu.sh:1707 +#: menu.sh:1708 msgid "Local upload" msgstr "本地上傳" -#: menu.sh:1713 menu.sh:1741 +#: menu.sh:1717 menu.sh:1745 msgid "addons" msgstr "挿件" -#: menu.sh:1717 menu.sh:1749 +#: menu.sh:1721 menu.sh:1753 msgid "modules" msgstr "模塊" -#: menu.sh:1721 menu.sh:1757 +#: menu.sh:1725 menu.sh:1761 msgid "LKMs" msgstr "LKMs" -#: menu.sh:1725 menu.sh:1733 +#: menu.sh:1729 menu.sh:1737 msgid "arpl" msgstr "arpl" -#: menu.sh:1767 menu.sh:1778 menu.sh:1789 menu.sh:1799 menu.sh:1816 -#: menu.sh:1830 +#: menu.sh:1771 menu.sh:1782 menu.sh:1793 menu.sh:1803 menu.sh:1820 +#: menu.sh:1834 msgid "Update" msgstr "更新" -#: menu.sh:1768 +#: menu.sh:1772 msgid "Please enter a proxy server url" msgstr "請輸入代理伺服器url" -#: menu.sh:1779 +#: menu.sh:1783 msgid "Invalid proxy server url, continue?" msgstr "無效的代理伺服器url, 是否繼續?" -#: menu.sh:1794 +#: menu.sh:1798 msgid "" "Please keep the attachment name consistent with the attachment name on " "Github.\\n" msgstr "請保持附件名稱與github上附件名稱一致.\\n" -#: menu.sh:1795 +#: menu.sh:1799 msgid "Upload update.zip will update arpl.\\n" msgstr "上傳 update.zip 将更新 arpl.\\n" -#: menu.sh:1796 +#: menu.sh:1800 msgid "Upload addons.zip will update Addons.\\n" msgstr "上傳 addons.zip 将更新 挿件.\\n" -#: menu.sh:1797 +#: menu.sh:1801 msgid "Upload modules.zip will update Modules.\\n" msgstr "上傳 modules.zip 将更新 模塊.\\n" -#: menu.sh:1798 +#: menu.sh:1802 msgid "Upload rp-lkms.zip will update LKMs.\\n" msgstr "上傳 rp-lkms.zip 将更新 LKMs.\\n" -#: menu.sh:1851 +#: menu.sh:1855 msgid "Choose a model" msgstr "選擇型號" -#: menu.sh:1853 +#: menu.sh:1857 msgid "Choose a version" msgstr "選擇版本" -#: menu.sh:1855 +#: menu.sh:1859 msgid "Addons menu" msgstr "挿件" -#: menu.sh:1856 +#: menu.sh:1860 msgid "Modules menu" msgstr "模塊" -#: menu.sh:1857 +#: menu.sh:1861 msgid "Cmdline menu" msgstr "設定 Cmdline" -#: menu.sh:1858 +#: menu.sh:1862 msgid "Synoinfo menu" msgstr "設定 Synoinfo" -#: menu.sh:1861 +#: menu.sh:1865 msgid "Advanced menu" msgstr "高級設定" -#: menu.sh:1864 +#: menu.sh:1868 msgid "Build the loader" msgstr "編譯引導" -#: menu.sh:1868 +#: menu.sh:1872 msgid "Boot the loader" msgstr "啟動" -#: menu.sh:1871 +#: menu.sh:1875 msgid "Choose a keymap" msgstr "選擇鍵盤" -#: menu.sh:1873 +#: menu.sh:1877 msgid "Clean disk cache" msgstr "清除磁碟緩存" -#: menu.sh:1875 +#: menu.sh:1879 msgid "Update menu" msgstr "更新" -#: menu.sh:1939 +#: menu.sh:1943 msgid "Choose a action" msgstr "選擇動作" -#: menu.sh:1940 +#: menu.sh:1944 msgid "Poweroff" msgstr "關機" -#: menu.sh:1941 +#: menu.sh:1945 msgid "Reboot" msgstr "重啓" -#: menu.sh:1942 +#: menu.sh:1946 msgid "Reboot to arpl" msgstr "重啓到arpl" -#: menu.sh:1943 +#: menu.sh:1947 msgid "Back to shell" msgstr "退出到shell" -#: menu.sh:1969 +#: menu.sh:1973 msgid "Call \\033[1;32mmenu.sh\\033[0m to return to menu" msgstr "執行 \\033[1;32mmenu.sh\\033[0m 重新進入設定選單" diff --git a/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.mo b/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.mo index 261b4b55..921899e6 100644 Binary files a/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.mo and b/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.mo differ diff --git a/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.po b/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.po index 32330f75..07ab9412 100644 --- a/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.po +++ b/files/board/arpl/overlayfs/opt/arpl/lang/zh_TW.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: arpl-i18n\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-24 20:08+0800\n" -"PO-Revision-Date: 2023-08-24 20:09+0800\n" +"POT-Creation-Date: 2023-09-01 08:27+0800\n" +"PO-Revision-Date: 2023-09-01 08:27+0800\n" "Last-Translator: March Fun \n" "Language-Team: Chinese (Taiwan) \n" "Language: zh_TW\n" @@ -89,47 +89,55 @@ msgstr "Cmdline:\\n" msgid "Reboot to boot directly in DSM" msgstr "重啓並直接進入 DSM 開機" -#: boot.sh:180 init.sh:179 +#: boot.sh:178 init.sh:179 msgid "Detected %s network cards." msgstr "檢測到 %s 個網卡。" -#: boot.sh:181 init.sh:180 +#: boot.sh:179 init.sh:180 msgid "Checking Connect." msgstr "檢查連線。" -#: boot.sh:199 +#: boot.sh:197 msgid "Waiting IP.(For reference only)" msgstr "取得 IP (僅供參考)" -#: boot.sh:206 init.sh:205 +#: boot.sh:204 init.sh:205 msgid "DOWN" msgstr "關閉" -#: boot.sh:210 init.sh:209 +#: boot.sh:208 init.sh:209 msgid "NOT CONNECTED" msgstr "未連線" -#: boot.sh:214 init.sh:213 +#: boot.sh:212 init.sh:213 msgid "TIMEOUT" msgstr "逾時" -#: boot.sh:220 +#: boot.sh:218 msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web." msgstr "在瀏覽器中瀏覽 \\033[1;34mhttp://%s:5000\\033[0m 連線 DSM。" -#: boot.sh:229 +#: boot.sh:230 +msgid "%2ds (accessing arpl will interrupt boot)" +msgstr "訪問arpl將中斷啟動" + +#: boot.sh:234 +msgid "A new access is connected, the boot process is interrupted." +msgstr "新的連接, 啟動過程被中斷." + +#: boot.sh:245 msgid "Loading DSM kernel..." msgstr "載入 DSM kernel..." -#: boot.sh:233 +#: boot.sh:249 msgid "Warning, running kexec with --noefi param, strange things will happen!!" msgstr "警告,使用'--noefi'參數執行'kexec',可能有意外事情發生!" -#: boot.sh:238 +#: boot.sh:254 msgid "Booting..." msgstr "開機中..." -#: boot.sh:240 +#: boot.sh:256 msgid "" "[This interface will not be operational. Please use the http://find.synology." "com/ find DSM and connect.]" @@ -266,7 +274,7 @@ msgstr "取得 pat 資料成功,\\n請確認或者依需要修改。" msgid "Reconfiguring Synoinfo, Addons and Modules" msgstr "重新設置 Syninfo、外掛和模組" -#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1700 +#: menu.sh:268 menu.sh:414 menu.sh:555 menu.sh:696 menu.sh:1712 msgid "Choose a option" msgstr "設定" @@ -290,8 +298,8 @@ msgstr "顯示所有可用外掛" msgid "Upload a external addon" msgstr "上傳外部外掛" -#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1708 -#: menu.sh:1876 menu.sh:1944 +#: menu.sh:274 menu.sh:421 menu.sh:551 menu.sh:691 menu.sh:1023 menu.sh:1709 +#: menu.sh:1880 menu.sh:1948 msgid "Exit" msgstr "退出" @@ -321,7 +329,7 @@ msgstr "沒有要删除的使用者外掛" msgid "Select addon to remove" msgstr "選擇要删除的外掛" -#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1790 +#: menu.sh:355 menu.sh:1275 menu.sh:1306 menu.sh:1339 menu.sh:1794 msgid "This feature is only available when accessed via web/ssh." msgstr "此功能僅在透過 web/ssh 存取時可用。" @@ -329,7 +337,7 @@ msgstr "此功能僅在透過 web/ssh 存取時可用。" msgid "Please upload the *.addons file." msgstr "請上傳 *.addons 檔案。" -#: menu.sh:373 menu.sh:526 menu.sh:1817 menu.sh:1831 +#: menu.sh:373 menu.sh:526 menu.sh:1821 menu.sh:1835 msgid "Not a valid file, please try again!" msgstr "不是有效的檔案,請重試!" @@ -627,7 +635,7 @@ msgstr "複製檔案: " msgid "Addon %s not found!" msgstr "外掛 %s 未找到!" -#: menu.sh:979 menu.sh:1927 +#: menu.sh:979 menu.sh:1931 msgid "Cleaning" msgstr "清除中" @@ -644,8 +652,8 @@ msgid "Switch direct boot:" msgstr "切換直接開機:" #: menu.sh:999 -msgid "Time of timeout of wait ip in boot:" -msgstr "開機時取得 IP 的逾時時間:" +msgid "Timeout of boot wait:" +msgstr "開機逾時時間:" #: menu.sh:1000 msgid "kernel switching method:" @@ -719,7 +727,7 @@ msgstr "顯示 dsm logo:" msgid "Advanced" msgstr "進階" -#: menu.sh:1026 menu.sh:1879 +#: menu.sh:1026 menu.sh:1883 msgid "Choose the option" msgstr "設定" @@ -923,7 +931,7 @@ msgstr "警告" msgid "Config changed, would you like to rebuild the loader?" msgstr "設置已變更,是否重新編譯開機檔?" -#: menu.sh:1505 menu.sh:1870 +#: menu.sh:1505 menu.sh:1874 msgid "Choose a language" msgstr "選擇語言" @@ -935,9 +943,9 @@ msgstr "選擇佈局" msgid "Choice a keymap" msgstr "選擇鍵盤" -#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1713 menu.sh:1717 -#: menu.sh:1721 menu.sh:1725 menu.sh:1733 menu.sh:1741 menu.sh:1749 -#: menu.sh:1757 +#: menu.sh:1550 menu.sh:1599 menu.sh:1650 menu.sh:1717 menu.sh:1721 +#: menu.sh:1725 menu.sh:1729 menu.sh:1737 menu.sh:1745 menu.sh:1753 +#: menu.sh:1761 msgid "Update %s" msgstr "更新 %s" @@ -999,23 +1007,23 @@ msgstr "安裝新 %s 中" msgid "%s updated with success!" msgstr "%s 更新成功!" -#: menu.sh:1701 +#: menu.sh:1700 msgid "Update all" msgstr "更新全部" -#: menu.sh:1702 +#: menu.sh:1701 msgid "Update arpl" msgstr "更新 ARPL" -#: menu.sh:1703 +#: menu.sh:1702 msgid "Update addons" msgstr "更新外掛" -#: menu.sh:1704 +#: menu.sh:1703 msgid "Update modules" msgstr "更新模組" -#: menu.sh:1705 +#: menu.sh:1704 msgid "Update LKMs" msgstr "更新 LKM" @@ -1023,129 +1031,129 @@ msgstr "更新 LKM" msgid "Set proxy server" msgstr "設定代理" -#: menu.sh:1707 +#: menu.sh:1708 msgid "Local upload" msgstr "本地上傳" -#: menu.sh:1713 menu.sh:1741 +#: menu.sh:1717 menu.sh:1745 msgid "addons" msgstr "外掛" -#: menu.sh:1717 menu.sh:1749 +#: menu.sh:1721 menu.sh:1753 msgid "modules" msgstr "模組" -#: menu.sh:1721 menu.sh:1757 +#: menu.sh:1725 menu.sh:1761 msgid "LKMs" msgstr "LKMs" -#: menu.sh:1725 menu.sh:1733 +#: menu.sh:1729 menu.sh:1737 msgid "arpl" msgstr "arpl" -#: menu.sh:1767 menu.sh:1778 menu.sh:1789 menu.sh:1799 menu.sh:1816 -#: menu.sh:1830 +#: menu.sh:1771 menu.sh:1782 menu.sh:1793 menu.sh:1803 menu.sh:1820 +#: menu.sh:1834 msgid "Update" msgstr "更新" -#: menu.sh:1768 +#: menu.sh:1772 msgid "Please enter a proxy server url" msgstr "請輸入代理伺服器網址" -#: menu.sh:1779 +#: menu.sh:1783 msgid "Invalid proxy server url, continue?" msgstr "無效的代理伺服器網址,是否繼續?" -#: menu.sh:1794 +#: menu.sh:1798 msgid "" "Please keep the attachment name consistent with the attachment name on " "Github.\\n" msgstr "請保持附件名稱與 github 上附件名稱一致。\\n" -#: menu.sh:1795 +#: menu.sh:1799 msgid "Upload update.zip will update arpl.\\n" msgstr "上傳 update.zip 將更新 arpl。\\n" -#: menu.sh:1796 +#: menu.sh:1800 msgid "Upload addons.zip will update Addons.\\n" msgstr "上傳 addons.zip 將更新 外掛。\\n" -#: menu.sh:1797 +#: menu.sh:1801 msgid "Upload modules.zip will update Modules.\\n" msgstr "上傳 modules.zip 將更新 模組。\\n" -#: menu.sh:1798 +#: menu.sh:1802 msgid "Upload rp-lkms.zip will update LKMs.\\n" msgstr "上傳 rp-lkms.zip 將更新 LKM。\\n" -#: menu.sh:1851 +#: menu.sh:1855 msgid "Choose a model" msgstr "選擇型號" -#: menu.sh:1853 +#: menu.sh:1857 msgid "Choose a version" msgstr "選擇版本" -#: menu.sh:1855 +#: menu.sh:1859 msgid "Addons menu" msgstr "外掛" -#: menu.sh:1856 +#: menu.sh:1860 msgid "Modules menu" msgstr "模組" -#: menu.sh:1857 +#: menu.sh:1861 msgid "Cmdline menu" msgstr "設定 Cmdline" -#: menu.sh:1858 +#: menu.sh:1862 msgid "Synoinfo menu" msgstr "設定 Synoinfo" -#: menu.sh:1861 +#: menu.sh:1865 msgid "Advanced menu" msgstr "進階設定" -#: menu.sh:1864 +#: menu.sh:1868 msgid "Build the loader" msgstr "編譯開機檔" -#: menu.sh:1868 +#: menu.sh:1872 msgid "Boot the loader" msgstr "開機" -#: menu.sh:1871 +#: menu.sh:1875 msgid "Choose a keymap" msgstr "選擇鍵盤" -#: menu.sh:1873 +#: menu.sh:1877 msgid "Clean disk cache" msgstr "清除磁碟快取" -#: menu.sh:1875 +#: menu.sh:1879 msgid "Update menu" msgstr "更新" -#: menu.sh:1939 +#: menu.sh:1943 msgid "Choose a action" msgstr "選擇動作" -#: menu.sh:1940 +#: menu.sh:1944 msgid "Poweroff" msgstr "關機" -#: menu.sh:1941 +#: menu.sh:1945 msgid "Reboot" msgstr "重新開機" -#: menu.sh:1942 +#: menu.sh:1946 msgid "Reboot to arpl" msgstr "重開機到 ARPL" -#: menu.sh:1943 +#: menu.sh:1947 msgid "Back to shell" msgstr "退回到 shell" -#: menu.sh:1969 +#: menu.sh:1973 msgid "Call \\033[1;32mmenu.sh\\033[0m to return to menu" msgstr "執行 \\033[1;32mmenu.sh\\033[0m 重新進入設定選單" diff --git a/files/board/arpl/overlayfs/opt/arpl/menu.sh b/files/board/arpl/overlayfs/opt/arpl/menu.sh index 7091cb5c..04050597 100755 --- a/files/board/arpl/overlayfs/opt/arpl/menu.sh +++ b/files/board/arpl/overlayfs/opt/arpl/menu.sh @@ -30,7 +30,7 @@ LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")" DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")" DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")" NOTSETMACS="$(readConfigKey "notsetmacs" "${USER_CONFIG_FILE}")" -BOOTIPWAIT="$(readConfigKey "bootipwait" "${USER_CONFIG_FILE}")" +BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")" KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")" SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")" @@ -82,7 +82,7 @@ function modelMenu() { if [ -z "${1}" ]; then RESTRICT=1 FLGBETA=0 - dialog --backtitle "$(backtitle)" --title "$(TEXT "Model")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Model")" \ --infobox "$(TEXT "Reading models")" 0 0 echo -n "" >"${TMP_PATH}/modellist" while read M; do @@ -115,7 +115,7 @@ function modelMenu() { done < <(cat "${TMP_PATH}/modellist" | sort -r -n -k 2) [ ${FLGNEX} -eq 1 ] && echo "f \"\Z1$(TEXT "Disable flags restriction")\Zn\"" >>"${TMP_PATH}/menu" [ ${FLGBETA} -eq 0 ] && echo "b \"\Z1$(TEXT "Show beta models")\Zn\"" >>"${TMP_PATH}/menu" - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --menu "$(TEXT "Choose the model")" 0 0 0 --file "${TMP_PATH}/menu" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return @@ -157,7 +157,7 @@ function modelMenu() { function productversMenu() { ITEMS="$(readConfigEntriesArray "productvers" "${MODEL_CONFIG_PATH}/${MODEL}.yml" | sort -r)" if [ -z "${1}" ]; then - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --no-items --menu "$(TEXT "Choose a product version")" 0 0 0 ${ITEMS} \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return @@ -170,17 +170,17 @@ function productversMenu() { if [ "${PRODUCTVER}" != "${resp}" ]; then local KVER=$(readModelKey "${MODEL}" "productvers.[${resp}].kver") if [ -d "/sys/firmware/efi" -a "${KVER:0:1}" = "3" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Product Version")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \ --msgbox "$(TEXT "This version does not support UEFI startup, Please select another version or switch the startup mode.")" 0 0 return fi if [ ! "usb" = "$(udevadm info --query property --name ${LOADER_DISK} | grep ID_BUS | cut -d= -f2)" -a "${KVER:0:1}" = "5" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Product Version")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \ --msgbox "$(TEXT "This version only support usb startup, Please select another version or switch the startup mode.")" 0 0 # return fi # get online pat data - dialog --backtitle "$(backtitle)" --title "$(TEXT "Product Version")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \ --infobox "$(TEXT "Get pat data ..")" 0 0 idx=0 while [ ${idx} -le 3 ]; do # Loop 3 times, if successful, break @@ -205,7 +205,7 @@ function productversMenu() { else MSG="$(TEXT "Successfully to get pat data,\nPlease confirm or modify as needed.")" fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Product Version")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \ --form "${MSG}" 10 110 2 "URL" 1 1 "${paturl}" 1 5 100 0 "MD5" 2 1 "${patsum}" 2 5 100 0 \ 2>"${TMP_PATH}/resp" [ $? -ne 0 ] && return @@ -220,7 +220,7 @@ function productversMenu() { SMALLNUM="" writeConfigKey "buildnum" "${BUILDNUM}" "${USER_CONFIG_FILE}" writeConfigKey "smallnum" "${SMALLNUM}" "${USER_CONFIG_FILE}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Product Version")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \ --infobox "$(TEXT "Reconfiguring Synoinfo, Addons and Modules")" 0 0 # Delete synoinfo and reload model/build synoinfo writeConfigKey "synoinfo" "{}" "${USER_CONFIG_FILE}" @@ -264,7 +264,7 @@ function addonMenu() { NEXT="a" # Loop menu while true; do - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --default-item ${NEXT} --menu "$(TEXT "Choose a option")" 0 0 0 \ a "$(TEXT "Add an addon")" \ d "$(TEXT "Delete addon(s)")" \ @@ -283,18 +283,18 @@ function addonMenu() { echo "${ADDON} \"${DESC}\"" >>"${TMP_PATH}/menu" done < <(availableAddons "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}") if [ ! -f "${TMP_PATH}/menu" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "$(TEXT "No available addons to add")" 0 0 NEXT="e" continue fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --menu "$(TEXT "Select an addon")" 0 0 0 --file "${TMP_PATH}/menu" \ 2>"${TMP_PATH}/resp" [ $? -ne 0 ] && continue ADDON="$(<"${TMP_PATH}/resp")" [ -z "${ADDON}" ] && continue - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --inputbox "$(TEXT "Type a optional params to addon")" 0 0 \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && continue @@ -306,7 +306,7 @@ function addonMenu() { d) NEXT='d' if [ ${#ADDONS[@]} -eq 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "$(TEXT "No user addons to remove")" 0 0 continue fi @@ -314,7 +314,7 @@ function addonMenu() { for I in "${!ADDONS[@]}"; do echo "\"${I}\" \"${I}\" \"off\"" >>"${TMP_PATH}/opts" done - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --no-tags --checklist "$(TEXT "Select addon to remove")" 0 0 0 --file "${TMP_PATH}/opts" \ 2>"${TMP_PATH}/resp" [ $? -ne 0 ] && continue @@ -332,7 +332,7 @@ function addonMenu() { for KEY in ${!ADDONS[@]}; do ITEMS+="${KEY}: ${ADDONS[$KEY]}\n" done - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "${ITEMS}" 0 0 ;; m) @@ -346,16 +346,16 @@ function addonMenu() { fi MSG+=": \Z5${DESC}\Zn\n" done < <(availableAddons "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}") - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "${MSG}" 0 0 ;; o) if ! tty | grep -q "/dev/pts"; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "$(TEXT "This feature is only available when accessed via web/ssh.")" 0 0 return fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "$(TEXT "Please upload the *.addons file.")" 0 0 TMP_UP_PATH=${TMP_PATH}/users USER_FILE="" @@ -369,21 +369,21 @@ function addonMenu() { done popd if [ -z "${USER_FILE}" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "$(TEXT "Not a valid file, please try again!")" 0 0 else if [ -d "${ADDONS_PATH}/$(basename ${USER_FILE} .addons)" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --yesno "$(TEXT "The addon already exists. Do you want to overwrite it?")" 0 0 RET=$? [ ${RET} -eq 0 ] && return fi ADDON="$(untarAddon "${TMP_UP_PATH}/${USER_FILE}")" if [ -n "${ADDON}" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "$(printf "$(TEXT "Addon '%s' added to loader, Please enable it in 'Add an addon' menu.")" "${ADDON}")" 0 0 else - dialog --backtitle "$(backtitle)" --title "$(TEXT "Addons")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Addons")" \ --msgbox "$(TEXT "File format not recognized!")" 0 0 fi fi @@ -399,7 +399,7 @@ function moduleMenu() { KVER="$(readModelKey "${MODEL}" "productvers.[${PRODUCTVER}].kver")" KPRE="$(readModelKey "${MODEL}" "productvers.[${PRODUCTVER}].kpre")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --infobox "$(TEXT "Reading modules")" 0 0 ALLMODULES=$(getAllModules "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}") unset USERMODULES @@ -410,7 +410,7 @@ function moduleMenu() { NEXT="s" # loop menu while true; do - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --default-item ${NEXT} --menu "$(TEXT "Choose a option")" 0 0 0 \ s "$(TEXT "Show selected modules")" \ l "$(TEXT "Select loaded modules")" \ @@ -427,11 +427,11 @@ function moduleMenu() { for KEY in ${!USERMODULES[@]}; do ITEMS+="${KEY}: ${USERMODULES[$KEY]}\n" done - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --msgbox "${ITEMS}" 0 0 ;; l) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --infobox "$(TEXT "Selecting loaded modules")" 0 0 KOLIST="" for I in $(lsmod | awk -F' ' '{print $1}' | grep -v 'Module'); do @@ -448,7 +448,7 @@ function moduleMenu() { DIRTY=1 ;; a) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --infobox "$(TEXT "Selecting all modules")" 0 0 unset USERMODULES declare -A USERMODULES @@ -461,7 +461,7 @@ function moduleMenu() { ;; d) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --infobox "$(TEXT "Deselecting all modules")" 0 0 writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}" unset USERMODULES @@ -475,13 +475,13 @@ function moduleMenu() { arrayExistItem "${ID}" "${!USERMODULES[@]}" && ACT="on" || ACT="off" echo "${ID} ${DESC} ${ACT}" >>"${TMP_PATH}/opts" done <<<${ALLMODULES} - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --checklist "$(TEXT "Select modules to include")" 0 0 0 --file "${TMP_PATH}/opts" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && continue resp=$(<${TMP_PATH}/resp) [ -z "${resp}" ] && continue - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --infobox "$(TEXT "Writing to user config")" 0 0 unset USERMODULES declare -A USERMODULES @@ -500,10 +500,10 @@ function moduleMenu() { MSG+="$(TEXT "This program will not determine the availability of imported modules or even make type judgments, as please double check if it is correct.\n")" MSG+="$(TEXT "If you want to remove it, please go to the \"Update Menu\" -> \"Update modules\" to forcibly update the modules. All imports will be reset.\n")" MSG+="$(TEXT "Do you want to continue?")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --yesno "${MSG}" 0 0 [ $? -ne 0 ] && return - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --msgbox "$(TEXT "Please upload the *.ko file.")" 0 0 TMP_UP_PATH=${TMP_PATH}/users USER_FILE="" @@ -518,11 +518,11 @@ function moduleMenu() { popd if [ -n "${USER_FILE}" -a "${USER_FILE##*.}" = "ko" ]; then addToModules ${PLATFORM} "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}" "${TMP_UP_PATH}/${USER_FILE}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --msgbox "$(printf "$(TEXT "Module '%s' added to %s-%s")" "${USER_FILE}" "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}")" 0 0 rm -f "${TMP_UP_PATH}/${USER_FILE}" else - dialog --backtitle "$(backtitle)" --title "$(TEXT "Modules")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Modules")" \ --msgbox "$(TEXT "Not a valid file, please try again!")" 0 0 fi ;; @@ -551,19 +551,19 @@ function cmdlineMenu() { echo "e \"$(TEXT "Exit")\"" >>"${TMP_PATH}/menu" # Loop menu while true; do - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --menu "$(TEXT "Choose a option")" 0 0 0 --file "${TMP_PATH}/menu" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return case "$(<${TMP_PATH}/resp)" in a) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --inputbox "$(TEXT "Type a name of cmdline")" 0 0 \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && continue NAME="$(sed 's/://g' <"${TMP_PATH}/resp")" [ -z "${NAME}" ] && continue - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --inputbox "$(printf "$(TEXT "Type a value of '%s' cmdline")" "${NAME}")" 0 0 "${CMDLINE[${NAME}]}" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && continue @@ -573,7 +573,7 @@ function cmdlineMenu() { ;; d) if [ ${#CMDLINE[@]} -eq 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --msgbox "$(TEXT "No user cmdline to remove")" 0 0 continue fi @@ -581,7 +581,7 @@ function cmdlineMenu() { for I in "${!CMDLINE[@]}"; do echo "\"${I}\" \"${CMDLINE[${I}]}\" \"off\"" >>"${TMP_PATH}/opts" done - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --checklist "$(TEXT "Select cmdline to remove")" 0 0 0 --file "${TMP_PATH}/opts" \ 2>"${TMP_PATH}/resp" [ $? -ne 0 ] && continue @@ -594,7 +594,7 @@ function cmdlineMenu() { ;; s) while true; do - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --inputbox "$(TEXT "Please enter a serial number ")" 0 0 "" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && break 2 @@ -606,7 +606,7 @@ function cmdlineMenu() { fi # At present, the SN rules are not complete, and many SNs are not truly invalid, so not provide tips now. break - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --yesno "$(TEXT "Invalid serial, continue?")" 0 0 [ $? -eq 0 ] && break done @@ -623,7 +623,7 @@ function cmdlineMenu() { [ -n "${MACF}" ] && MAC=${MACF} || MAC=${MACR} RET=1 while true; do - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --inputbox "$(printf "$(TEXT "Type a custom MAC address of %s")" "mac${N}")" 0 0 "${MAC}" \ 2>${TMP_PATH}/resp RET=$? @@ -633,7 +633,7 @@ function cmdlineMenu() { [ -z "${MAC}" ] && MAC="${MACFS[$(expr ${i} - 1)]}" MACF="$(echo "${MAC}" | sed "s/:\|-\| //g")" [ ${#MACF} -eq 12 ] && break - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --msgbox "$(TEXT "Invalid MAC")" 0 0 done if [ ${RET} -eq 0 ]; then @@ -643,13 +643,13 @@ function cmdlineMenu() { writeConfigKey "cmdline.netif_num" "${N}" "${USER_CONFIG_FILE}" MAC="${MACF:0:2}:${MACF:2:2}:${MACF:4:2}:${MACF:6:2}:${MACF:8:2}:${MACF:10:2}" ip link set dev ${ETHX[$(expr ${N} - 1)]} address "${MAC}" 2>&1 | - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --progressbox "$(TEXT "Changing MAC")" 20 70 /etc/init.d/S41dhcpcd restart 2>&1 | - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --progressbox "$(TEXT "Renewing IP")" 20 70 # IP=`ip route 2>/dev/null | sed -n 's/.* via .* dev \(.*\) src \(.*\) metric .*/\1: \2 /p' | head -1` - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --yesno "$(TEXT "Continue to custom MAC?")" 0 0 [ $? -ne 0 ] && break fi @@ -660,7 +660,7 @@ function cmdlineMenu() { for KEY in ${!CMDLINE[@]}; do ITEMS+="${KEY}: ${CMDLINE[$KEY]}\n" done - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --msgbox "${ITEMS}" 0 0 ;; m) @@ -668,7 +668,7 @@ function cmdlineMenu() { while IFS=': ' read KEY VALUE; do ITEMS+="${KEY}: ${VALUE}\n" done < <(readModelMap "${MODEL}" "productvers.[${PRODUCTVER}].cmdline") - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cmdline")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cmdline")" \ --msgbox "${ITEMS}" 0 0 ;; e) return ;; @@ -692,19 +692,19 @@ function synoinfoMenu() { # menu loop while true; do - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --menu "$(TEXT "Choose a option")" 0 0 0 --file "${TMP_PATH}/menu" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return case "$(<${TMP_PATH}/resp)" in a) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Synoinfo")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Synoinfo")" \ --inputbox "$(TEXT "Type a name of synoinfo entry")" 0 0 \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && continue NAME="$(<"${TMP_PATH}/resp")" [ -z "${NAME}" ] && continue - dialog --backtitle "$(backtitle)" --title "$(TEXT "Synoinfo")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Synoinfo")" \ --inputbox "$(printf "$(TEXT "Type a value of '%s' synoinfo entry")" "${NAME}")" 0 0 "${SYNOINFO[${NAME}]}" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && continue @@ -715,7 +715,7 @@ function synoinfoMenu() { ;; d) if [ ${#SYNOINFO[@]} -eq 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Synoinfo")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Synoinfo")" \ --msgbox "$(TEXT "No synoinfo entries to remove")" 0 0 continue fi @@ -723,7 +723,7 @@ function synoinfoMenu() { for I in ${!SYNOINFO[@]}; do echo "\"${I}\" \"${SYNOINFO[${I}]}\" \"off\"" >>"${TMP_PATH}/opts" done - dialog --backtitle "$(backtitle)" --title "$(TEXT "Synoinfo")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Synoinfo")" \ --checklist "$(TEXT "Select synoinfo entry to remove")" 0 0 0 --file "${TMP_PATH}/opts" \ 2>"${TMP_PATH}/resp" [ $? -ne 0 ] && continue @@ -740,7 +740,7 @@ function synoinfoMenu() { for KEY in ${!SYNOINFO[@]}; do ITEMS+="${KEY}: ${SYNOINFO[$KEY]}\n" done - dialog --backtitle "$(backtitle)" --title "$(TEXT "Synoinfo")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Synoinfo")" \ --msgbox "${ITEMS}" 0 0 ;; e) return ;; @@ -795,7 +795,7 @@ function extractDsmFiles() { STATUS=$(curl -k -w "%{http_code}" -L "${PATURL}" -o "${PAT_PATH}" --progress-bar) if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then rm "${PAT_PATH}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "Check internet or cache disk space")" 0 0 return 1 fi @@ -803,7 +803,7 @@ function extractDsmFiles() { echo -n "$(printf "$(TEXT "Checking hash of %s: ")" "${PAT_FILE}")" if [ "$(md5sum ${PAT_PATH} | awk '{print $1}')" != "${PATSUM}" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "md5 Hash of pat not match, try again!")" 0 0 rm -f ${PAT_PATH} return 1 @@ -829,7 +829,7 @@ function extractDsmFiles() { isencrypted="yes" ;; *) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "Could not determine if pat file is encrypted or not, maybe corrupted, try again!")" 0 0 return 1 ;; @@ -857,7 +857,7 @@ function extractDsmFiles() { STATUS=$(curl -k -w "%{http_code}" -L "${OLDPATURL}" -o "${OLDPAT_PATH}" --progress-bar) if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then rm "${OLDPAT_PATH}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "Check internet or cache disk space")" 0 0 return 1 fi @@ -869,7 +869,7 @@ function extractDsmFiles() { if [ $? -ne 0 ]; then rm -f "${OLDPAT_PATH}" rm -rf "${RAMDISK_PATH}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --textbox "${LOG_FILE}" 0 0 return 1 fi @@ -893,7 +893,7 @@ function extractDsmFiles() { echo "$(TEXT "Extracting...")" tar -xf "${PAT_PATH}" -C "${UNTAR_PAT_PATH}" >"${LOG_FILE}" 2>&1 if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --textbox "${LOG_FILE}" 0 0 fi fi @@ -901,7 +901,7 @@ function extractDsmFiles() { [ ! -f ${UNTAR_PAT_PATH}/GRUB_VER ] || [ ! -f ${UNTAR_PAT_PATH}/zImage ] || [ ! -f ${UNTAR_PAT_PATH}/rd.gz ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "pat Invalid, try again!")" 0 0 return 1 fi @@ -949,7 +949,7 @@ function make() { while IFS=': ' read ADDON PARAM; do [ -z "${ADDON}" ] && continue if ! checkAddonExist "${ADDON}" "${PLATFORM}" "$([ -n "${KPRE}" ] && echo "${KPRE}-")${KVER}"; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(printf "$(TEXT "Addon %s not found!")" "${ADDON}")" 0 0 return 1 fi @@ -962,14 +962,14 @@ function make() { /opt/arpl/zimage-patch.sh if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "zImage not patched:\n")$(<"${LOG_FILE}")" 0 0 return 1 fi /opt/arpl/ramdisk-patch.sh if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Error")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Error")" \ --msgbox "$(TEXT "Ramdisk not patched:\n")$(<"${LOG_FILE}")" 0 0 return 1 fi @@ -996,7 +996,7 @@ function advancedMenu() { if loaderIsConfigured; then echo "q \"$(TEXT "Switch direct boot:") \Z4${DIRECTBOOT}\Zn\"" >>"${TMP_PATH}/menu" if [ "${DIRECTBOOT}" = "false" ]; then - echo "w \"$(TEXT "Time of timeout of wait ip in boot:") \Z4${BOOTIPWAIT}\Zn\"" >>"${TMP_PATH}/menu" + echo "w \"$(TEXT "Timeout of boot wait:") \Z4${BOOTWAIT}\Zn\"" >>"${TMP_PATH}/menu" echo "k \"$(TEXT "kernel switching method:") \Z4${KERNELWAY}\Zn\"" >>"${TMP_PATH}/menu" fi fi @@ -1022,7 +1022,7 @@ function advancedMenu() { echo "g \"$(TEXT "Show dsm logo:") \Z4${DSMLOGO}\Zn\"" >>"${TMP_PATH}/menu" echo "e \"$(TEXT "Exit")\"" >>"${TMP_PATH}/menu" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --default-item "${NEXT}" --menu "$(TEXT "Choose the option")" 0 0 0 --file "${TMP_PATH}/menu" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && break @@ -1040,14 +1040,14 @@ function advancedMenu() { ;; w) ITEMS="$(echo -e "1 \n5 \n10 \n30 \n60 \n")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ - --default-item "${BOOTIPWAIT}" --no-items --menu "$(TEXT "Choose a waiting time(seconds)")" 0 0 0 ${ITEMS} \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ + --default-item "${BOOTWAIT}" --no-items --menu "$(TEXT "Choose a waiting time(seconds)")" 0 0 0 ${ITEMS} \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return resp=$(cat ${TMP_PATH}/resp 2>/dev/null) [ -z "${resp}" ] && return - BOOTIPWAIT=${resp} - writeConfigKey "bootipwait" "${BOOTIPWAIT}" "${USER_CONFIG_FILE}" + BOOTWAIT=${resp} + writeConfigKey "bootwait" "${BOOTWAIT}" "${USER_CONFIG_FILE}" NEXT="e" ;; k) @@ -1116,14 +1116,14 @@ function advancedMenu() { MSG+="\n" MSG+="$(printf "$(TEXT "\nTotal of ports: %s\n")" "${NUMPORTS}")" MSG+="$(TEXT "\nPorts with color \Z1red\Zn as DUMMY, color \Z2\Zbgreen\Zn has drive connected.")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "${MSG}" 0 0 ;; c) PATURL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")" PATSUM="$(readConfigKey "patsum" "${USER_CONFIG_FILE}")" MSG="$(TEXT "pat: (editable)")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --form "${MSG}" 10 110 2 "URL" 1 1 "${PATURL}" 1 5 100 0 "MD5" 2 1 "${PATSUM}" 2 5 100 0 \ 2>"${TMP_PATH}/resp" [ $? -ne 0 ] && return @@ -1141,7 +1141,7 @@ function advancedMenu() { MSG+="$(TEXT "This feature will allow you to downgrade the installation by removing the VERSION file from the first partition of all disks.\n")" MSG+="$(TEXT "Therefore, please insert all disks before continuing.\n")" MSG+="$(TEXT "Warning:\nThis operation is irreversible. Please backup important data. Do you want to continue?")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "${MSG}" 0 0 [ $? -ne 0 ] && return ( @@ -1154,10 +1154,10 @@ function advancedMenu() { umount "${I}" done rm -rf "${TMP_PATH}/sdX1" - ) | dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + ) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --progressbox "$(TEXT "Removing ...")" 20 70 MSG="$(TEXT "Remove VERSION file for all disks completed.")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "${MSG}" 0 0 ;; f) @@ -1167,17 +1167,17 @@ function advancedMenu() { echo "${POSITION}" | grep -q "${LOADER_DEVICE_NAME}" && continue echo "\"${POSITION}\" \"${NAME}\" \"off\"" >>"${TMP_PATH}/opts" done < <(ls -l /dev/disk/by-id/ | sed 's|../..|/dev|g' | grep -E "/dev/sd|/dev/nvme" | awk -F' ' '{print $NF" "$(NF-2)}' | sort -uk 1,1) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --checklist "$(TEXT "Advanced")" 0 0 0 --file "${TMP_PATH}/opts" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return RESP=$(<"${TMP_PATH}/resp") [ -z "${RESP}" ] && return - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(TEXT "Warning:\nThis operation is irreversible. Please backup important data. Do you want to continue?")" 0 0 [ $? -ne 0 ] && return if [ $(ls /dev/md* | wc -l) -gt 0 ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(TEXT "Warning:\nThe current hds is in raid, do you still want to format them?")" 0 0 [ $? -ne 0 ] && return for I in $(ls /dev/md*); do @@ -1188,9 +1188,9 @@ function advancedMenu() { for I in ${RESP}; do mkfs.ext4 -T largefile4 "${I}" done - ) | dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + ) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --progressbox "$(TEXT "Formatting ...")" 20 70 - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "Formatting is complete.")" 0 0 ;; x) @@ -1207,12 +1207,12 @@ function advancedMenu() { done rm -rf "${TMP_PATH}/sdX1" if [ -z "${SHADOW_FILE}" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "The installed Syno system not found in the currently inserted disks!")" 0 0 return fi ITEMS="$(cat "${SHADOW_FILE}" | awk -F ':' '{if ($2 != "*" && $2 != "!!") {print $1;}}')" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --no-items --menu "$(TEXT "Choose a user name")" 0 0 0 ${ITEMS} \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return @@ -1220,13 +1220,13 @@ function advancedMenu() { [ -z "${USER}" ] && return OLDPASSWD="$(cat "${SHADOW_FILE}" | grep "^${USER}:" | awk -F ':' '{print $2}')" while true; do - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --inputbox "$(printf "$(TEXT "Type a new password for user '%s'")" "${USER}")" 0 0 "${CMDLINE[${NAME}]}" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && break 2 VALUE="$(<"${TMP_PATH}/resp")" [ -n "${VALUE}" ] && break - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "Invalid password")" 0 0 done NEWPASSWD="$(python -c "import crypt,getpass;pw=\"${VALUE}\";print(crypt.crypt(pw))")" @@ -1239,19 +1239,19 @@ function advancedMenu() { umount "${I}" done rm -rf "${TMP_PATH}/sdX1" - ) | dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + ) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --progressbox "$(TEXT "Resetting ...")" 20 70 [ -f "${SHADOW_FILE}" ] && rm -rf "${SHADOW_FILE}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "Password reset completed.")" 0 0 # dialog --backtitle "`backtitle`" --title "$(TEXT "Advanced")" \ # --msgbox "$(TEXT "You came early, this function has not been implemented yet, hahaha!")" 0 0 ;; p) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(TEXT "Warning:\nDo not terminate midway, otherwise it may cause damage to the arpl. Do you want to continue?")" 0 0 [ $? -ne 0 ] && return - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --infobox "$(TEXT "Saving ...")" 0 0 RDXZ_PATH="${TMP_PATH}/rdxz_tmp" mkdir -p "${RDXZ_PATH}" @@ -1266,16 +1266,16 @@ function advancedMenu() { find . 2>/dev/null | cpio -o -H newc -R root:root | xz --check=crc32 >"${ARPL_RAMDISK_FILE}" ) || true rm -rf "${RDXZ_PATH}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox ""$(TEXT "Save is complete.")"" 0 0 ;; d) if ! tty | grep -q "/dev/pts"; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "This feature is only available when accessed via web/ssh.")" 0 0 return fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "Currently, only dts format files are supported. Please prepare and click to confirm uploading.\n(saved in /mnt/p3/users/)")" 0 0 TMP_UP_PATH="${TMP_PATH}/users" rm -rf "${TMP_UP_PATH}" @@ -1290,31 +1290,31 @@ function advancedMenu() { done popd if [ ${RET} -ne 0 -o -z "${USER_FILE}" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "Not a valid dts file, please try again!")" 0 0 else mkdir -p "${USER_UP_PATH}" cp -f "${USER_FILE}" "${USER_UP_PATH}/${MODEL}.dts" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "A valid dts file, Automatically import at compile time.")" 0 0 fi DIRTY=1 ;; b) if ! tty | grep -q "/dev/pts"; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "This feature is only available when accessed via web/ssh.")" 0 0 return fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(TEXT "Warning:\nDo not terminate midway, otherwise it may cause damage to the arpl. Do you want to continue?")" 0 0 [ $? -ne 0 ] && return - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --infobox "$(TEXT "Backuping...")" 0 0 rm -f /var/www/data/backup.img.gz # thttpd root path dd if="${LOADER_DISK}" bs=1M conv=fsync | gzip >/var/www/data/backup.img.gz if [ $? -ne 0]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "Failed to generate backup. There may be insufficient memory. Please clear the cache and try again!")" 0 0 return fi @@ -1324,22 +1324,22 @@ function advancedMenu() { echo " ↑ " >>${TMP_PATH}/resp echo "$(TEXT "Click on the address above to download.")" >>${TMP_PATH}/resp echo "$(TEXT "Please confirm the completion of the download before closing this window.")" >>${TMP_PATH}/resp - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --editbox "${TMP_PATH}/resp" 10 100 else # ssh sz -be /var/www/data/backup.img.gz fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "backup is complete.")" 0 0 rm -f /var/www/data/backup.img.gz ;; r) if ! tty | grep -q "/dev/pts"; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "This feature is only available when accessed via web/ssh.")" 0 0 return fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(TEXT "Please upload the backup file.\nCurrently, zip(github) and img.gz(backup) compressed file formats are supported.")" 0 0 [ $? -ne 0 ] && return IFTOOL="" @@ -1356,16 +1356,16 @@ function advancedMenu() { done popd if [ -z "${IFTOOL}" -o -z "${TMP_UP_PATH}/${USER_FILE}" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(printf "$(TEXT "Not a valid .zip/.img.gz file, please try again!")" "${USER_FILE}")" 0 0 else - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(TEXT "Warning:\nDo not terminate midway, otherwise it may cause damage to the arpl. Do you want to continue?")" 0 0 [ $? -ne 0 ] && ( rm -f "${LOADER_DISK}" return ) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --infobox "$(TEXT "Writing...")" 0 0 umount "${BOOTLOADER_PATH}" "${SLPART_PATH}" "${CACHE_PATH}" if [ "${IFTOOL}" = "zip" ]; then @@ -1373,7 +1373,7 @@ function advancedMenu() { elif [ "${IFTOOL}" = "gzip" ]; then gzip -dc "${TMP_UP_PATH}/${USER_FILE}" | dd of="${LOADER_DISK}" bs=1M conv=fsync fi - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(printf "$(TEXT "Restore bootloader disk with success to %s!\nReboot?")" "${USER_FILE}")" 0 0 [ $? -ne 0 ] && continue reboot @@ -1381,7 +1381,7 @@ function advancedMenu() { fi ;; o) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --yesno "$(TEXT "This option only installs opkg package management, allowing you to install more tools for use and debugging. Do you want to continue?")" 0 0 [ $? -ne 0 ] && return ( @@ -1390,9 +1390,9 @@ function advancedMenu() { source ~/.bashrc opkg update #opkg install python3 python3-pip - ) | dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + ) | dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --progressbox "$(TEXT "opkg installing ...")" 20 70 - dialog --backtitle "$(backtitle)" --title "$(TEXT "Advanced")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Advanced")" \ --msgbox "$(TEXT "opkg install is complete. Please reconnect to SSH/web, or execute 'source ~/.bashrc'")" 0 0 ;; g) @@ -1408,7 +1408,7 @@ function advancedMenu() { ############################################################################### # Try to recovery a DSM already installed function tryRecoveryDSM() { - dialog --backtitle "$(backtitle)" --title "$(TEXT "Try recovery DSM")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Try recovery DSM")" \ --infobox "$(TEXT "Trying to recovery a DSM installed system")" 0 0 if findAndMountDSMRoot; then MODEL="" @@ -1445,14 +1445,14 @@ function tryRecoveryDSM() { SMALLNUM=${smallfixnumber} writeConfigKey "buildnum" "${BUILDNUM}" "${USER_CONFIG_FILE}" writeConfigKey "smallnum" "${SMALLNUM}" "${USER_CONFIG_FILE}" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Try recovery DSM")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Try recovery DSM")" \ --msgbox "${MSG}" 0 0 fi fi fi fi else - dialog --backtitle "$(backtitle)" --title "$(TEXT "Try recovery DSM")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Try recovery DSM")" \ --msgbox "$(TEXT "Unfortunately I couldn't mount the DSM partition!")" 0 0 fi } @@ -1461,13 +1461,13 @@ function tryRecoveryDSM() { # Permits user edit the user config function editUserConfig() { while true; do - dialog --backtitle "$(backtitle)" --title "$(TEXT "Edit with caution")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Edit with caution")" \ --editbox "${USER_CONFIG_FILE}" 0 0 2>"${TMP_PATH}/userconfig" [ $? -ne 0 ] && return mv "${TMP_PATH}/userconfig" "${USER_CONFIG_FILE}" ERRORS=$(yq eval "${USER_CONFIG_FILE}" 2>&1) [ $? -eq 0 ] && break - dialog --backtitle "$(backtitle)" --title "$(TEXT "Edit with caution")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Edit with caution")" \ --msgbox "${ERRORS}" 0 0 done OLDMODEL=${MODEL} @@ -1489,7 +1489,7 @@ function editUserConfig() { ############################################################################### # Calls boot.sh to boot into DSM kernel/ramdisk function boot() { - [ ${DIRTY} -eq 1 ] && dialog --backtitle "$(backtitle)" --title "$(TEXT "Alert")" \ + [ ${DIRTY} -eq 1 ] && dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Alert")" \ --yesno "$(TEXT "Config changed, would you like to rebuild the loader?")" 0 0 if [ $? -eq 0 ]; then make || return @@ -1501,7 +1501,7 @@ function boot() { # Shows language to user choose one function languageMenu() { ITEMS="$(ls /usr/share/locale)" - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --default-item "${LAYOUT}" --no-items --menu "$(TEXT "Choose a language")" 0 0 0 ${ITEMS} 2>${TMP_PATH}/resp [ $? -ne 0 ] && return resp=$(cat ${TMP_PATH}/resp 2>/dev/null) @@ -1515,7 +1515,7 @@ function languageMenu() { # Shows available keymaps to user choose one function keymapMenu() { OPTIONS="azerty bepo carpalx colemak dvorak fgGIod neo olpc qwerty qwertz" - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --default-item "${LAYOUT}" --no-items --menu "$(TEXT "Choose a layout")" 0 0 0 ${OPTIONS} \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return @@ -1527,7 +1527,7 @@ function keymapMenu() { cd /usr/share/keymaps/i386/${LAYOUT} ls *.map.gz ) - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --default-item "${KEYMAP}" --no-items --menu "$(TEXT "Choice a keymap")" 0 0 0 ${OPTIONS} \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return @@ -1549,7 +1549,7 @@ function downloadExts() { [ -n "${PROXY}" ] && [[ "${PROXY: -1}" != "/" ]] && PROXY="${PROXY}/" T="$(printf "$(TEXT "Update %s")" "${1}")" - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "Checking last version")" 0 0 # TAG=`curl -skL "${PROXY}https://api.github.com/repos/wjz304/arpl-addons/releases/latest" | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'` # In the absence of authentication, the default API access count for GitHub is 60 per hour, so removing the use of api.github.com @@ -1558,35 +1558,35 @@ function downloadExts() { [ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}" if [ -z "${TAG}" ]; then if [ ! "${5}" = "0" ]; then - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "Error checking new version")" 0 0 else - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --msgbox "$(TEXT "Error checking new version")" 0 0 fi return 1 fi if [ "${2}" = "${TAG}" ]; then if [ ! "${5}" = "0" ]; then - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "No new version.")" 0 0 return 1 else - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --yesno "$(printf "$(TEXT "No new version. Actual version is %s\nForce update?")" "${2}")" 0 0 [ $? -ne 0 ] && return 1 fi fi - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "Downloading last version")" 0 0 rm -f "${TMP_PATH}/${4}.zip" STATUS=$(curl -kL -w "%{http_code}" "${PROXY}${3}/releases/download/${TAG}/${4}.zip" -o "${TMP_PATH}/${4}.zip") if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then if [ ! "${5}" = "0" ]; then - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "Error downloading new version")" 0 0 else - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --msgbox "$(TEXT "Error downloading new version")" 0 0 fi return 1 @@ -1597,18 +1597,18 @@ function downloadExts() { # 1 - ext name function updateArpl() { T="$(printf "$(TEXT "Update %s")" "${1}")" - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "Extracting last version")" 0 0 unzip -oq "${TMP_PATH}/update.zip" -d "${TMP_PATH}/" if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --msgbox "$(TEXT "Error extracting update file")" 0 0 return 1 fi # Check checksums (cd /tmp && sha256sum --status -c sha256sum) if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --msgbox "$(TEXT "Checksum do not match!")" 0 0 return 1 fi @@ -1617,12 +1617,12 @@ function updateArpl() { chmod +x "${TMP_PATH}/update-check.sh" ${TMP_PATH}/update-check.sh if [ $? -ne 0 ]; then - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --msgbox "$(TEXT "The current version does not support upgrading to the latest update.zip. Please remake the bootloader disk!")" 0 0 return 1 fi fi - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "Installing new files")" 0 0 # Process update-list.yml while read F; do @@ -1639,7 +1639,7 @@ function updateArpl() { mv "${TMP_PATH}/$(basename "${KEY}")" "${VALUE}" fi done < <(readConfigMap "replace" "${TMP_PATH}/update-list.yml") - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --msgbox "$(printf "$(TEXT "Arpl updated with success to %s!\nReboot?")" "${TAG}")" 0 0 arpl-reboot.sh config } @@ -1648,13 +1648,13 @@ function updateArpl() { # 2 - silent function updateExts() { T="$(printf "$(TEXT "Update %s")" "${1}")" - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(TEXT "Extracting last version")" 0 0 if [ "${1}" = "addons" ]; then rm -rf "${TMP_PATH}/addons" mkdir -p "${TMP_PATH}/addons" unzip "${TMP_PATH}/addons.zip" -d "${TMP_PATH}/addons" >/dev/null 2>&1 - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(printf "$(TEXT "Installing new %s")" "${1}")" 0 0 rm -Rf "${ADDONS_PATH}/"* [ -f "${TMP_PATH}/addons/VERSION" ] && cp -f "${TMP_PATH}/addons/VERSION" "${ADDONS_PATH}/" @@ -1683,10 +1683,10 @@ function updateExts() { fi DIRTY=1 if [ ! "${2}" = "0" ]; then - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --infobox "$(printf "$(TEXT "%s updated with success!")" "${1}")" 0 0 else - dialog --backtitle "$(backtitle)" --title "${T}" \ + dialog --backtitle "$(backtitle)" --colors --title "${T}" \ --msgbox "$(printf "$(TEXT "%s updated with success!")" "${1}")" 0 0 fi } @@ -1708,7 +1708,7 @@ function updateMenu() { echo "u \"$(TEXT "Local upload")\"" >>"${TMP_PATH}/menu" echo "e \"$(TEXT "Exit")\"" >>"${TMP_PATH}/menu" - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --menu "$(TEXT "Choose a option")" 0 0 0 --file "${TMP_PATH}/menu" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && return @@ -1768,7 +1768,7 @@ function updateMenu() { p) RET=1 while true; do - dialog --backtitle "$(backtitle)" --title "$(TEXT "Update")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Update")" \ --inputbox "$(TEXT "Please enter a proxy server url")" 0 0 "${PROXY}" \ 2>${TMP_PATH}/resp RET=$? @@ -1779,7 +1779,7 @@ function updateMenu() { elif [[ "${PROXYSERVER}" =~ "^(https?|ftp)://[^\s/$.?#].[^\s]*$" ]]; then break else - dialog --backtitle "$(backtitle)" --title "$(TEXT "Update")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Update")" \ --yesno "$(TEXT "Invalid proxy server url, continue?")" 0 0 RET=$? [ ${RET} -eq 0 ] && break @@ -1790,7 +1790,7 @@ function updateMenu() { u) if ! tty | grep -q "/dev/pts"; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Update")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Update")" \ --msgbox "$(TEXT "This feature is only available when accessed via web/ssh.")" 0 0 return fi @@ -1800,7 +1800,7 @@ function updateMenu() { MSG+="$(TEXT "Upload addons.zip will update Addons.\n")" MSG+="$(TEXT "Upload modules.zip will update Modules.\n")" MSG+="$(TEXT "Upload rp-lkms.zip will update LKMs.\n")" - dialog --backtitle "$(backtitle)" --title "$(TEXT "Update")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Update")" \ --msgbox "${MSG}" 0 0 EXTS=("update.zip" "addons.zip" "modules.zip" "rp-lkms.zip") TMP_UP_PATH="${TMP_PATH}/users" @@ -1817,7 +1817,7 @@ function updateMenu() { done popd if [ -z "${USER_FILE}" ]; then - dialog --backtitle "$(backtitle)" --title "$(TEXT "Update")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Update")" \ --msgbox "$(TEXT "Not a valid file, please try again!")" 0 0 else rm "${TMP_PATH}/${USER_FILE}" @@ -1831,7 +1831,7 @@ function updateMenu() { elif [ "${USER_FILE}" = "rp-lkms.zip" ]; then updateExts "LKMs" "0" else - dialog --backtitle "$(backtitle)" --title "$(TEXT "Update")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Update")" \ --msgbox "$(TEXT "Not a valid file, please try again!")" 0 0 fi fi @@ -1879,7 +1879,7 @@ while true; do echo "p \"$(TEXT "Update menu")\"" >>"${TMP_PATH}/menu" echo "e \"$(TEXT "Exit")\"" >>"${TMP_PATH}/menu" - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --default-item ${NEXT} --menu "$(TEXT "Choose the option")" 0 0 0 --file "${TMP_PATH}/menu" \ 2>${TMP_PATH}/resp [ $? -ne 0 ] && break @@ -1928,7 +1928,7 @@ while true; do NEXT="m" ;; c) - dialog --backtitle "$(backtitle)" --title "$(TEXT "Cleaning")" \ + dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Cleaning")" \ --prgbox "rm -rfv \"${CACHE_PATH}/dl\"" 0 0 NEXT="d" ;; @@ -1939,7 +1939,7 @@ while true; do e) NEXT="e" while true; do - dialog --backtitle "$(backtitle)" \ + dialog --backtitle "$(backtitle)" --colors \ --default-item ${NEXT} --menu "$(TEXT "Choose a action")" 0 0 0 \ p "$(TEXT "Poweroff")" \ r "$(TEXT "Reboot")" \