mod update

This commit is contained in:
Ing 2023-06-20 01:32:24 +08:00
parent 787a150377
commit c074062ad5
4 changed files with 568 additions and 508 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-15 22:36+0800\n"
"POT-Creation-Date: 2023-06-20 01:19+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -30,7 +30,7 @@ msgid "DSM zImage changed"
msgstr ""
#: boot.sh:35 boot.sh:47 menu.sh:703 menu.sh:729 menu.sh:798 menu.sh:809
#: menu.sh:838 menu.sh:851 menu.sh:858 menu.sh:1051 menu.sh:1149
#: menu.sh:838 menu.sh:851 menu.sh:858 menu.sh:1063 menu.sh:1161
msgid "Error"
msgstr ""
@ -77,35 +77,35 @@ msgstr ""
msgid "Reboot to boot directly in DSM"
msgstr ""
#: boot.sh:161
#: boot.sh:162
msgid "Detected %s network cards, Waiting IP.(For reference only)"
msgstr ""
#: boot.sh:168 init.sh:184
#: boot.sh:169 init.sh:184
msgid "DOWN"
msgstr ""
#: boot.sh:172 init.sh:188
#: boot.sh:173 init.sh:188
msgid "ERROR"
msgstr ""
#: boot.sh:178
#: boot.sh:179
msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web."
msgstr ""
#: boot.sh:187
#: boot.sh:188
msgid "Loading DSM kernel..."
msgstr ""
#: boot.sh:191
#: boot.sh:192
msgid "Warning, running kexec with --noefi param, strange things will happen!!"
msgstr ""
#: boot.sh:196
#: boot.sh:197
msgid "Booting..."
msgstr ""
#: boot.sh:199
#: boot.sh:200
msgid ""
"[This interface will not be operational. Please use the http://find.synology."
"com/ find DSM and connect.]"
@ -223,7 +223,7 @@ msgstr ""
msgid "Reconfiguring Synoinfo, Addons and Modules"
msgstr ""
#: menu.sh:209 menu.sh:328 menu.sh:461 menu.sh:593 menu.sh:1357
#: menu.sh:209 menu.sh:328 menu.sh:461 menu.sh:593 menu.sh:1495
msgid "Choose a option"
msgstr ""
@ -247,8 +247,8 @@ msgstr ""
msgid "Download a external addon"
msgstr ""
#: menu.sh:215 menu.sh:335 menu.sh:458 menu.sh:589 menu.sh:906 menu.sh:1363
#: menu.sh:1630
#: menu.sh:215 menu.sh:335 menu.sh:458 menu.sh:589 menu.sh:906 menu.sh:1502
#: menu.sh:1650
msgid "Exit"
msgstr ""
@ -317,7 +317,7 @@ msgid "File format not recognized!"
msgstr ""
#: menu.sh:316 menu.sh:346 menu.sh:361 menu.sh:372 menu.sh:385 menu.sh:391
#: menu.sh:1610
#: menu.sh:1630
msgid "Modules"
msgstr ""
@ -458,7 +458,7 @@ msgstr ""
msgid "Please enter a serial number "
msgstr ""
#: menu.sh:512 menu.sh:550 menu.sh:1304 menu.sh:1581
#: menu.sh:512 menu.sh:550 menu.sh:1316 menu.sh:1552
msgid "Alert"
msgstr ""
@ -613,7 +613,7 @@ msgstr ""
msgid "Addon %s not found!"
msgstr ""
#: menu.sh:863 menu.sh:1648
#: menu.sh:863 menu.sh:1668
msgid "Cleaning"
msgstr ""
@ -630,7 +630,7 @@ msgid "Switch direct boot:"
msgstr ""
#: menu.sh:884
msgid "boot IPs wait time':"
msgid "boot IPs wait time:"
msgstr ""
#: menu.sh:887
@ -653,7 +653,7 @@ msgstr ""
msgid "show pat download link"
msgstr ""
#: menu.sh:894 menu.sh:987 menu.sh:1000
#: menu.sh:894 menu.sh:994 menu.sh:1007
msgid "Allow downgrade installation"
msgstr ""
@ -661,11 +661,11 @@ msgstr ""
msgid "Format disk(s) # Without loader disk"
msgstr ""
#: menu.sh:896 menu.sh:1056 menu.sh:1063 menu.sh:1069 menu.sh:1081
#: menu.sh:896 menu.sh:1068 menu.sh:1075 menu.sh:1081 menu.sh:1093
msgid "Reset syno system password"
msgstr ""
#: menu.sh:897 menu.sh:1090 menu.sh:1093
#: menu.sh:897 menu.sh:1102 menu.sh:1105
msgid "Persistence of arpl modifications"
msgstr ""
@ -681,15 +681,15 @@ msgstr ""
msgid "Restore bootloader disk # test"
msgstr ""
#: menu.sh:905 menu.sh:1213 menu.sh:1222
#: menu.sh:905 menu.sh:1225 menu.sh:1234
msgid "Development tools"
msgstr ""
#: menu.sh:908 menu.sh:1013
#: menu.sh:908 menu.sh:1025
msgid "Advanced"
msgstr ""
#: menu.sh:909 menu.sh:1633
#: menu.sh:909 menu.sh:1653
msgid "Choose the option"
msgstr ""
@ -697,322 +697,294 @@ msgstr ""
msgid "Choose a waiting time(seconds)"
msgstr ""
#: menu.sh:967
#: menu.sh:974
msgid "\\nTotal of ports: %s\\n"
msgstr ""
#: menu.sh:968
#: menu.sh:975
msgid ""
"\\nPorts with color \\Z1red\\Zn as DUMMY, color \\Z2\\Zbgreen\\Zn has drive "
"connected."
msgstr ""
#: menu.sh:969
#: menu.sh:976
msgid "\\nRecommended value:"
msgstr ""
#: menu.sh:970
#: menu.sh:977
msgid "\\nDiskIdxMap:"
msgstr ""
#: menu.sh:979
#: menu.sh:986
msgid "*.pat download link"
msgstr ""
#: menu.sh:984
#: menu.sh:991
msgid ""
"This feature will allow you to downgrade the installation by removing the "
"VERSION file from the first partition of all disks.\\n"
msgstr ""
#: menu.sh:985
#: menu.sh:992
msgid "Therefore, please insert all disks before continuing.\\n"
msgstr ""
#: menu.sh:986 menu.sh:1018
#: menu.sh:993 menu.sh:1030
msgid ""
"Warning:\\nThis operation is irreversible. Please backup important data. Do "
"you want to continue?"
msgstr ""
#: menu.sh:1001
#: menu.sh:1008
msgid "Removing ..."
msgstr ""
#: menu.sh:1002
#: menu.sh:1009
msgid "Remove VERSION file for all disks completed."
msgstr ""
#: menu.sh:1012 menu.sh:1017 menu.sh:1021 menu.sh:1032
#: menu.sh:1024 menu.sh:1029 menu.sh:1033 menu.sh:1044
msgid "Format disk"
msgstr ""
#: menu.sh:1022
#: menu.sh:1034
msgid ""
"Warning:\\nThe current hds is in raid, do you still want to format them?"
msgstr ""
#: menu.sh:1033
#: menu.sh:1045
msgid "Formatting ..."
msgstr ""
#: menu.sh:1035
#: menu.sh:1047
msgid "Formatting is complete."
msgstr ""
#: menu.sh:1052
#: menu.sh:1064
msgid "The installed Syno system not found in the currently inserted disks!"
msgstr ""
#: menu.sh:1057
#: menu.sh:1069
msgid "Choose a user name"
msgstr ""
#: menu.sh:1064
#: menu.sh:1076
msgid "Type a new password for user '%s'"
msgstr ""
#: menu.sh:1069
#: menu.sh:1081
msgid "Invalid password"
msgstr ""
#: menu.sh:1082
#: menu.sh:1094
msgid "Resetting ..."
msgstr ""
#: menu.sh:1085
#: menu.sh:1097
msgid "Password reset completed."
msgstr ""
#: menu.sh:1091 menu.sh:1142 menu.sh:1195
#: menu.sh:1103 menu.sh:1154 menu.sh:1207
msgid ""
"Warning:\\nDo not terminate midway, otherwise it may cause damage to the "
"arpl. Do you want to continue?"
msgstr ""
#: menu.sh:1094
#: menu.sh:1106
msgid "Persisting ..."
msgstr ""
#: menu.sh:1103
#: menu.sh:1115
msgid "Persisting is complete."
msgstr ""
#: menu.sh:1108 menu.sh:1138 menu.sh:1171
#: menu.sh:1120 menu.sh:1150 menu.sh:1183 menu.sh:1564
msgid "This feature is only available when accessed via web/ssh."
msgstr ""
#: menu.sh:1112
#: menu.sh:1124
msgid ""
"Currently, only dts format files are supported. Please prepare and click to "
"confirm uploading.\\n(saved in /mnt/p3/users/)"
msgstr ""
#: menu.sh:1126 menu.sh:1131
#: menu.sh:1138 menu.sh:1143
msgid "Custom dts file"
msgstr ""
#: menu.sh:1127
#: menu.sh:1139
msgid "Not a valid dts file, please try again!"
msgstr ""
#: menu.sh:1132
#: menu.sh:1144
msgid "A valid dts file, Automatically import at compile time."
msgstr ""
#: menu.sh:1141 menu.sh:1144
#: menu.sh:1153 menu.sh:1156
msgid "Backup bootloader disk"
msgstr ""
#: menu.sh:1145
#: menu.sh:1157
msgid "Backuping..."
msgstr ""
#: menu.sh:1150
#: menu.sh:1162
msgid ""
"Failed to generate backup. There may be insufficient memory. Please clear "
"the cache and try again!"
msgstr ""
#: menu.sh:1157
#: menu.sh:1169
msgid "Click on the address above to download."
msgstr ""
#: menu.sh:1158
#: menu.sh:1170
msgid ""
"Please confirm the completion of the download before closing this window."
msgstr ""
#: menu.sh:1159
#: menu.sh:1171
msgid "backup.img.gz download link"
msgstr ""
#: menu.sh:1165
#: menu.sh:1177
msgid "backup is complete."
msgstr ""
#: menu.sh:1174 menu.sh:1191 menu.sh:1194 menu.sh:1197 menu.sh:1205
#: menu.sh:1186 menu.sh:1203 menu.sh:1206 menu.sh:1209 menu.sh:1217
msgid "Restore bootloader disk"
msgstr ""
#: menu.sh:1175
#: menu.sh:1187
msgid ""
"Please upload the backup file.\\nCurrently, zip(github) and img.gz(backup) "
"compressed file formats are supported."
msgstr ""
#: menu.sh:1192
#: menu.sh:1204
msgid "Not a valid .zip/.img.gz file, please try again!"
msgstr ""
#: menu.sh:1198
#: menu.sh:1210
msgid "Writing..."
msgstr ""
#: menu.sh:1206
#: menu.sh:1218
msgid "Restore bootloader disk with success to %s!\\nReboot?"
msgstr ""
#: menu.sh:1214
#: menu.sh:1226
msgid ""
"This option only installs opkg package management, allowing you to install "
"more tools for use and debugging. Do you want to continue?"
msgstr ""
#: menu.sh:1223
#: menu.sh:1235
msgid "opkg installing ..."
msgstr ""
#: menu.sh:1225
#: menu.sh:1237
msgid ""
"opkg install is complete. Please reconnect to SSH/web, or execute 'source ~/."
"bashrc'"
msgstr ""
#: menu.sh:1235 menu.sh:1263 menu.sh:1270
#: menu.sh:1247 menu.sh:1275 menu.sh:1282
msgid "Try recovery DSM"
msgstr ""
#: menu.sh:1236
#: menu.sh:1248
msgid "Trying to recovery a DSM installed system"
msgstr ""
#: menu.sh:1257
#: menu.sh:1269
msgid "Found a installation:\\nModel: %s\\nBuildnumber: %s"
msgstr ""
#: menu.sh:1261
#: menu.sh:1273
msgid "\\nSerial: %s"
msgstr ""
#: menu.sh:1271
#: menu.sh:1283
msgid "Unfortunately I couldn't mount the DSM partition!"
msgstr ""
#: menu.sh:1279
#: menu.sh:1291
msgid "Edit with caution"
msgstr ""
#: menu.sh:1285
#: menu.sh:1297
msgid "Invalid YAML format"
msgstr ""
#: menu.sh:1305
#: menu.sh:1317
msgid "Config changed, would you like to rebuild the loader?"
msgstr ""
#: menu.sh:1317 menu.sh:1624
#: menu.sh:1329 menu.sh:1644
msgid "Choose a language"
msgstr ""
#: menu.sh:1330
#: menu.sh:1342
msgid "Choose a layout"
msgstr ""
#: menu.sh:1340
#: menu.sh:1352
msgid "Choice a keymap"
msgstr ""
#: menu.sh:1358 menu.sh:1368 menu.sh:1376 menu.sh:1382 menu.sh:1386
#: menu.sh:1391 menu.sh:1397 menu.sh:1404 menu.sh:1413 menu.sh:1418
#: menu.sh:1435
msgid "Update arpl"
#: menu.sh:1369 menu.sh:1402 menu.sh:1453 menu.sh:1507 menu.sh:1515
#: menu.sh:1523 menu.sh:1531
msgid "Update %s"
msgstr ""
#: menu.sh:1359 menu.sh:1443 menu.sh:1451 menu.sh:1457 menu.sh:1461
#: menu.sh:1465 menu.sh:1469 menu.sh:1474 menu.sh:1485
msgid "Update addons"
msgstr ""
#: menu.sh:1360 menu.sh:1490 menu.sh:1498 menu.sh:1504 menu.sh:1508
#: menu.sh:1512 menu.sh:1527
msgid "Update modules"
msgstr ""
#: menu.sh:1361 menu.sh:1532 menu.sh:1540 menu.sh:1546 menu.sh:1550
#: menu.sh:1554 menu.sh:1558 menu.sh:1563
msgid "Update LKMs"
msgstr ""
#: menu.sh:1362
msgid "Set proxy server"
msgstr ""
#: menu.sh:1369 menu.sh:1444 menu.sh:1491 menu.sh:1533
#: menu.sh:1372
msgid "Checking last version"
msgstr ""
#: menu.sh:1377 menu.sh:1452 menu.sh:1499 menu.sh:1541
#: menu.sh:1380
msgid "Error checking new version"
msgstr ""
#: menu.sh:1383 menu.sh:1458 menu.sh:1505 menu.sh:1547
#: menu.sh:1385
msgid "No new version. Actual version is %s\\nForce update?"
msgstr ""
#: menu.sh:1387
msgid "Downloading last version %s"
#: menu.sh:1389
msgid "Downloading last version"
msgstr ""
#: menu.sh:1392
msgid "Error downloading update file"
#: menu.sh:1394
msgid "Error downloading new version"
msgstr ""
#: menu.sh:1398
#: menu.sh:1404 menu.sh:1455
msgid "Extracting last version"
msgstr ""
#: menu.sh:1408
msgid "Error extracting update file"
msgstr ""
#: menu.sh:1405
#: menu.sh:1415
msgid "Checksum do not match!"
msgstr ""
#: menu.sh:1414
#: menu.sh:1424
msgid ""
"The current version does not support upgrading to the latest update.zip. "
"Please remake the bootloader disk!"
msgstr ""
#: menu.sh:1419
#: menu.sh:1429
msgid "Installing new files"
msgstr ""
#: menu.sh:1436
#: menu.sh:1446
msgid "Arpl updated with success to %s!\\nReboot?"
msgstr ""
#: menu.sh:1462 menu.sh:1509 menu.sh:1551
msgid "Downloading last version"
msgstr ""
#: menu.sh:1466
msgid "Error downloading new version"
msgstr ""
#: menu.sh:1470 menu.sh:1559
msgid "Extracting last version"
msgstr ""
#: menu.sh:1475
#: menu.sh:1461
msgid "Installing new addons"
msgstr ""
@ -1020,74 +992,128 @@ msgstr ""
msgid "Addons updated with success!"
msgstr ""
#: menu.sh:1513 menu.sh:1555
msgid "Error downloading last version"
#: menu.sh:1496
msgid "Update arpl"
msgstr ""
#: menu.sh:1528
msgid "Modules updated with success!"
#: menu.sh:1497
msgid "Update addons"
msgstr ""
#: menu.sh:1564
msgid "LKMs updated with success!"
#: menu.sh:1498
msgid "Update modules"
msgstr ""
#: menu.sh:1570
#: menu.sh:1499
msgid "Update LKMs"
msgstr ""
#: menu.sh:1500
msgid "Set proxy server"
msgstr ""
#: menu.sh:1501 menu.sh:1590 menu.sh:1604
msgid "Local upload"
msgstr ""
#: menu.sh:1507
msgid "arpl"
msgstr ""
#: menu.sh:1515
msgid "addons"
msgstr ""
#: menu.sh:1523
msgid "modules"
msgstr ""
#: menu.sh:1531
msgid "LKMs"
msgstr ""
#: menu.sh:1541
msgid "Set Proxy Server"
msgstr ""
#: menu.sh:1571
#: menu.sh:1542
msgid "Please enter a proxy server url"
msgstr ""
#: menu.sh:1582
#: menu.sh:1553
msgid "Invalid proxy server url, continue?"
msgstr ""
#: menu.sh:1605
msgid "Choose a model"
#: menu.sh:1568
msgid ""
"Please keep the attachment name consistent with the attachment name on "
"Github.\\n"
msgstr ""
#: menu.sh:1607
msgid "Choose a Build Number"
#: menu.sh:1569
msgid "Upload update.zip will update arpl.\\n"
msgstr ""
#: menu.sh:1609
msgid "Addons"
#: menu.sh:1570
msgid "Upload addons.zip will update Addons.\\n"
msgstr ""
#: menu.sh:1611
msgid "Cmdline menu"
#: menu.sh:1571
msgid "Upload modules.zip will update Modules.\\n"
msgstr ""
#: menu.sh:1612
msgid "Synoinfo menu"
#: menu.sh:1572
msgid "Upload rp-lkms.zip will update LKMs.\\n"
msgstr ""
#: menu.sh:1615
msgid "Advanced menu"
msgstr ""
#: menu.sh:1618
msgid "Build the loader"
msgstr ""
#: menu.sh:1622
msgid "Boot the loader"
#: menu.sh:1591 menu.sh:1605
msgid "Not a valid file, please try again!"
msgstr ""
#: menu.sh:1625
msgid "Choose a keymap"
msgid "Choose a model"
msgstr ""
#: menu.sh:1627
msgid "Clean disk cache"
msgid "Choose a Build Number"
msgstr ""
#: menu.sh:1629
msgid "Addons"
msgstr ""
#: menu.sh:1631
msgid "Cmdline menu"
msgstr ""
#: menu.sh:1632
msgid "Synoinfo menu"
msgstr ""
#: menu.sh:1635
msgid "Advanced menu"
msgstr ""
#: menu.sh:1638
msgid "Build the loader"
msgstr ""
#: menu.sh:1642
msgid "Boot the loader"
msgstr ""
#: menu.sh:1645
msgid "Choose a keymap"
msgstr ""
#: menu.sh:1647
msgid "Clean disk cache"
msgstr ""
#: menu.sh:1649
msgid "Update menu"
msgstr ""
#: menu.sh:1655
#: menu.sh:1675
msgid "Call \\033[1;32mmenu.sh\\033[0m to return to menu"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: arpl-i18n\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-15 22:36+0800\n"
"PO-Revision-Date: 2023-06-15 22:37+0800\n"
"POT-Creation-Date: 2023-06-20 01:19+0800\n"
"PO-Revision-Date: 2023-06-20 01:19+0800\n"
"Last-Translator: ing <wjz304@qq.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
@ -29,7 +29,7 @@ msgid "DSM zImage changed"
msgstr "DSM zImage 已更改"
#: boot.sh:35 boot.sh:47 menu.sh:703 menu.sh:729 menu.sh:798 menu.sh:809
#: menu.sh:838 menu.sh:851 menu.sh:858 menu.sh:1051 menu.sh:1149
#: menu.sh:838 menu.sh:851 menu.sh:858 menu.sh:1063 menu.sh:1161
msgid "Error"
msgstr "错误"
@ -76,35 +76,35 @@ msgstr "Cmdline:\\n"
msgid "Reboot to boot directly in DSM"
msgstr "重启并直接进入DSM引导"
#: boot.sh:161
#: boot.sh:162
msgid "Detected %s network cards, Waiting IP.(For reference only)"
msgstr "检测到 %s 个网卡, 获取 IP.(仅供参考)"
#: boot.sh:168 init.sh:184
#: boot.sh:169 init.sh:184
msgid "DOWN"
msgstr "卸载"
#: boot.sh:172 init.sh:188
#: boot.sh:173 init.sh:188
msgid "ERROR"
msgstr "错误"
#: boot.sh:178
#: boot.sh:179
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:187
#: boot.sh:188
msgid "Loading DSM kernel..."
msgstr "加载 DSM kernel..."
#: boot.sh:191
#: boot.sh:192
msgid "Warning, running kexec with --noefi param, strange things will happen!!"
msgstr "警告, 使用'--noefi'参数运行'kexec', 可能有不好的事情发生!!"
#: boot.sh:196
#: boot.sh:197
msgid "Booting..."
msgstr "引导中..."
#: boot.sh:199
#: boot.sh:200
msgid ""
"[This interface will not be operational. Please use the http://find.synology."
"com/ find DSM and connect.]"
@ -222,7 +222,7 @@ msgstr "该版本仅支持 usb 启动, 请选择其他版本或者切换启动
msgid "Reconfiguring Synoinfo, Addons and Modules"
msgstr "重新配置 Syninfo, 插件和模块"
#: menu.sh:209 menu.sh:328 menu.sh:461 menu.sh:593 menu.sh:1357
#: menu.sh:209 menu.sh:328 menu.sh:461 menu.sh:593 menu.sh:1495
msgid "Choose a option"
msgstr "设置"
@ -246,8 +246,8 @@ msgstr "显示所有可用插件"
msgid "Download a external addon"
msgstr "下载外部插件"
#: menu.sh:215 menu.sh:335 menu.sh:458 menu.sh:589 menu.sh:906 menu.sh:1363
#: menu.sh:1630
#: menu.sh:215 menu.sh:335 menu.sh:458 menu.sh:589 menu.sh:906 menu.sh:1502
#: menu.sh:1650
msgid "Exit"
msgstr "退出"
@ -316,7 +316,7 @@ msgid "File format not recognized!"
msgstr "文件格式无法识别!"
#: menu.sh:316 menu.sh:346 menu.sh:361 menu.sh:372 menu.sh:385 menu.sh:391
#: menu.sh:1610
#: menu.sh:1630
msgid "Modules"
msgstr "模块"
@ -457,7 +457,7 @@ msgstr "选择要删除的参数"
msgid "Please enter a serial number "
msgstr "请输入SN "
#: menu.sh:512 menu.sh:550 menu.sh:1304 menu.sh:1581
#: menu.sh:512 menu.sh:550 menu.sh:1316 menu.sh:1552
msgid "Alert"
msgstr "警告"
@ -612,7 +612,7 @@ msgstr "拷贝文件: "
msgid "Addon %s not found!"
msgstr "插件 %s 未找到!"
#: menu.sh:863 menu.sh:1648
#: menu.sh:863 menu.sh:1668
msgid "Cleaning"
msgstr "清除中"
@ -652,7 +652,7 @@ msgstr "显示SATA(s) # 端口和驱动器"
msgid "show pat download link"
msgstr "当前pat下载链接"
#: menu.sh:894 menu.sh:987 menu.sh:1000
#: menu.sh:894 menu.sh:994 menu.sh:1007
msgid "Allow downgrade installation"
msgstr "允许降级安装"
@ -660,11 +660,11 @@ msgstr "允许降级安装"
msgid "Format disk(s) # Without loader disk"
msgstr "格式化磁盘(s) # 不含启动盘"
#: menu.sh:896 menu.sh:1056 menu.sh:1063 menu.sh:1069 menu.sh:1081
#: menu.sh:896 menu.sh:1068 menu.sh:1075 menu.sh:1081 menu.sh:1093
msgid "Reset syno system password"
msgstr "重置群晖系统密码"
#: menu.sh:897 menu.sh:1090 menu.sh:1093
#: menu.sh:897 menu.sh:1102 menu.sh:1105
msgid "Persistence of arpl modifications"
msgstr "持久化arpl的修改"
@ -680,15 +680,15 @@ msgstr "备份启动盘 # 测试"
msgid "Restore bootloader disk # test"
msgstr "恢复启动盘 # 测试"
#: menu.sh:905 menu.sh:1213 menu.sh:1222
#: menu.sh:905 menu.sh:1225 menu.sh:1234
msgid "Development tools"
msgstr "开发者工具"
#: menu.sh:908 menu.sh:1013
#: menu.sh:908 menu.sh:1025
msgid "Advanced"
msgstr "高级"
#: menu.sh:909 menu.sh:1633
#: menu.sh:909 menu.sh:1653
msgid "Choose the option"
msgstr "设置"
@ -696,322 +696,294 @@ msgstr "设置"
msgid "Choose a waiting time(seconds)"
msgstr "选择一个等待时间(秒)"
#: menu.sh:967
#: menu.sh:974
msgid "\\nTotal of ports: %s\\n"
msgstr "\\n端口总数: %s\\n"
#: menu.sh:968
#: menu.sh:975
msgid ""
"\\nPorts with color \\Z1red\\Zn as DUMMY, color \\Z2\\Zbgreen\\Zn has drive "
"connected."
msgstr "\\n\\Z1红色\\Zn 为模拟端口, \\Z2\\Zb绿色\\Zn 为已驱动的物理端口."
#: menu.sh:969
#: menu.sh:976
msgid "\\nRecommended value:"
msgstr "\\n建议值:"
#: menu.sh:970
#: menu.sh:977
msgid "\\nDiskIdxMap:"
msgstr "\\nDiskIdxMap:"
#: menu.sh:979
#: menu.sh:986
msgid "*.pat download link"
msgstr "*.pat 下载链接"
#: menu.sh:984
#: menu.sh:991
msgid ""
"This feature will allow you to downgrade the installation by removing the "
"VERSION file from the first partition of all disks.\\n"
msgstr "此功能通过删除所有磁盘的第一个分区的VERSION文件来允许你降级安装.\\n"
#: menu.sh:985
#: menu.sh:992
msgid "Therefore, please insert all disks before continuing.\\n"
msgstr "因此, 请插入所有磁盘后再进行操作.\\n"
#: menu.sh:986 menu.sh:1018
#: menu.sh:993 menu.sh:1030
msgid ""
"Warning:\\nThis operation is irreversible. Please backup important data. Do "
"you want to continue?"
msgstr "警告:\\n该操作不可逆, 请提前备份重要数据. 是否继续?"
#: menu.sh:1001
#: menu.sh:1008
msgid "Removing ..."
msgstr "删除中..."
#: menu.sh:1002
#: menu.sh:1009
msgid "Remove VERSION file for all disks completed."
msgstr "已移除所有磁盘的 VERSION 文件."
#: menu.sh:1012 menu.sh:1017 menu.sh:1021 menu.sh:1032
#: menu.sh:1024 menu.sh:1029 menu.sh:1033 menu.sh:1044
msgid "Format disk"
msgstr "格式化磁盘"
#: menu.sh:1022
#: menu.sh:1034
msgid ""
"Warning:\\nThe current hds is in raid, do you still want to format them?"
msgstr "当前的硬盘处于raid中是否仍要格式化?"
#: menu.sh:1033
#: menu.sh:1045
msgid "Formatting ..."
msgstr "格式化中..."
#: menu.sh:1035
#: menu.sh:1047
msgid "Formatting is complete."
msgstr "格式化完成."
#: menu.sh:1052
#: menu.sh:1064
msgid "The installed Syno system not found in the currently inserted disks!"
msgstr "未在当前插入的硬盘中找到已安装的syno系统!"
#: menu.sh:1057
#: menu.sh:1069
msgid "Choose a user name"
msgstr "选择一个用户"
#: menu.sh:1064
#: menu.sh:1076
msgid "Type a new password for user '%s'"
msgstr "输入用户 '%s' 的新密码"
#: menu.sh:1069
#: menu.sh:1081
msgid "Invalid password"
msgstr "无效密码"
#: menu.sh:1082
#: menu.sh:1094
msgid "Resetting ..."
msgstr "重置中"
#: menu.sh:1085
#: menu.sh:1097
msgid "Password reset completed."
msgstr "重置密码完成."
#: menu.sh:1091 menu.sh:1142 menu.sh:1195
#: menu.sh:1103 menu.sh:1154 menu.sh:1207
msgid ""
"Warning:\\nDo not terminate midway, otherwise it may cause damage to the "
"arpl. Do you want to continue?"
msgstr "警告:\\n请不要中途停止, 否则将导致arpl引导损毁, 是否继续?"
#: menu.sh:1094
#: menu.sh:1106
msgid "Persisting ..."
msgstr "持久化中..."
#: menu.sh:1103
#: menu.sh:1115
msgid "Persisting is complete."
msgstr "持久化完成."
#: menu.sh:1108 menu.sh:1138 menu.sh:1171
#: menu.sh:1120 menu.sh:1150 menu.sh:1183 menu.sh:1564
msgid "This feature is only available when accessed via web/ssh."
msgstr "此功能仅通过web/ssh访问时可用."
#: menu.sh:1112
#: menu.sh:1124
msgid ""
"Currently, only dts format files are supported. Please prepare and click to "
"confirm uploading.\\n(saved in /mnt/p3/users/)"
msgstr "目前, 只支持dts格式的文件, 请准备并点击确认上传.\\n(保存于 /mnt/p3/users/ 中)"
#: menu.sh:1126 menu.sh:1131
#: menu.sh:1138 menu.sh:1143
msgid "Custom dts file"
msgstr "自定义 dts 文件"
#: menu.sh:1127
#: menu.sh:1139
msgid "Not a valid dts file, please try again!"
msgstr "dts 文件无效, 请重试!"
#: menu.sh:1132
#: menu.sh:1144
msgid "A valid dts file, Automatically import at compile time."
msgstr "dts 文件有效, 将在编译时自动导入."
#: menu.sh:1141 menu.sh:1144
#: menu.sh:1153 menu.sh:1156
msgid "Backup bootloader disk"
msgstr "备份启动盘"
#: menu.sh:1145
#: menu.sh:1157
msgid "Backuping..."
msgstr "备份中..."
#: menu.sh:1150
#: menu.sh:1162
msgid ""
"Failed to generate backup. There may be insufficient memory. Please clear "
"the cache and try again!"
msgstr "生成备份失败, 可能内存不足, 请清除缓存重试!"
#: menu.sh:1157
#: menu.sh:1169
msgid "Click on the address above to download."
msgstr "点击上面的地址下载."
#: menu.sh:1158
#: menu.sh:1170
msgid ""
"Please confirm the completion of the download before closing this window."
msgstr "请确认下载完成再关闭此窗口."
#: menu.sh:1159
#: menu.sh:1171
msgid "backup.img.gz download link"
msgstr "backup.img.gz 下载链接"
#: menu.sh:1165
#: menu.sh:1177
msgid "backup is complete."
msgstr "备份完成."
#: menu.sh:1174 menu.sh:1191 menu.sh:1194 menu.sh:1197 menu.sh:1205
#: menu.sh:1186 menu.sh:1203 menu.sh:1206 menu.sh:1209 menu.sh:1217
msgid "Restore bootloader disk"
msgstr "恢复启动盘"
#: menu.sh:1175
#: menu.sh:1187
msgid ""
"Please upload the backup file.\\nCurrently, zip(github) and img.gz(backup) "
"compressed file formats are supported."
msgstr "请上传备份的文件\\n当前支持 zip(github) 和 img.gz(backup) 格式."
#: menu.sh:1192
#: menu.sh:1204
msgid "Not a valid .zip/.img.gz file, please try again!"
msgstr "不是有效的.zip/.img.gz文件, 请重试!"
#: menu.sh:1198
#: menu.sh:1210
msgid "Writing..."
msgstr "写入中..."
#: menu.sh:1206
#: menu.sh:1218
msgid "Restore bootloader disk with success to %s!\\nReboot?"
msgstr "成功恢复启动盘到 %s!\\n重启?"
#: menu.sh:1214
#: menu.sh:1226
msgid ""
"This option only installs opkg package management, allowing you to install "
"more tools for use and debugging. Do you want to continue?"
msgstr "该选项仅安装 opkg 包管理工具, 使你能够安装更多的工具以供使用和调试, 是否继续?"
#: menu.sh:1223
#: menu.sh:1235
msgid "opkg installing ..."
msgstr "opkg 安装中 ..."
#: menu.sh:1225
#: menu.sh:1237
msgid ""
"opkg install is complete. Please reconnect to SSH/web, or execute 'source ~/."
"bashrc'"
msgstr "opkg 安装完成. 请重新链接 SSH/web, 或者执行 'source ~/.bashrc'"
#: menu.sh:1235 menu.sh:1263 menu.sh:1270
#: menu.sh:1247 menu.sh:1275 menu.sh:1282
msgid "Try recovery DSM"
msgstr "尝试恢复DSM系统"
#: menu.sh:1236
#: menu.sh:1248
msgid "Trying to recovery a DSM installed system"
msgstr "尝试恢复已安装的DSM系统中"
#: menu.sh:1257
#: menu.sh:1269
msgid "Found a installation:\\nModel: %s\\nBuildnumber: %s"
msgstr "找到已安装:\\n型号: %s\\n版本: %s"
#: menu.sh:1261
#: menu.sh:1273
msgid "\\nSerial: %s"
msgstr "\\nSN: %s"
#: menu.sh:1271
#: menu.sh:1283
msgid "Unfortunately I couldn't mount the DSM partition!"
msgstr "很遗憾, 我无法挂载DSM分区!"
#: menu.sh:1279
#: menu.sh:1291
msgid "Edit with caution"
msgstr "请谨慎编辑"
#: menu.sh:1285
#: menu.sh:1297
msgid "Invalid YAML format"
msgstr "无效的YAML格式"
#: menu.sh:1305
#: menu.sh:1317
msgid "Config changed, would you like to rebuild the loader?"
msgstr "配置已更改, 是否重新编译引导?"
#: menu.sh:1317 menu.sh:1624
#: menu.sh:1329 menu.sh:1644
msgid "Choose a language"
msgstr "选择语言"
#: menu.sh:1330
#: menu.sh:1342
msgid "Choose a layout"
msgstr "选择布局"
#: menu.sh:1340
#: menu.sh:1352
msgid "Choice a keymap"
msgstr "选择键盘"
#: menu.sh:1358 menu.sh:1368 menu.sh:1376 menu.sh:1382 menu.sh:1386
#: menu.sh:1391 menu.sh:1397 menu.sh:1404 menu.sh:1413 menu.sh:1418
#: menu.sh:1435
msgid "Update arpl"
msgstr "更新arpl"
#: menu.sh:1369 menu.sh:1402 menu.sh:1453 menu.sh:1507 menu.sh:1515
#: menu.sh:1523 menu.sh:1531
msgid "Update %s"
msgstr "更新 %s"
#: menu.sh:1359 menu.sh:1443 menu.sh:1451 menu.sh:1457 menu.sh:1461
#: menu.sh:1465 menu.sh:1469 menu.sh:1474 menu.sh:1485
msgid "Update addons"
msgstr "更新插件"
#: menu.sh:1360 menu.sh:1490 menu.sh:1498 menu.sh:1504 menu.sh:1508
#: menu.sh:1512 menu.sh:1527
msgid "Update modules"
msgstr "更新模块"
#: menu.sh:1361 menu.sh:1532 menu.sh:1540 menu.sh:1546 menu.sh:1550
#: menu.sh:1554 menu.sh:1558 menu.sh:1563
msgid "Update LKMs"
msgstr "更新LKMs"
#: menu.sh:1362
msgid "Set proxy server"
msgstr "设置代理"
#: menu.sh:1369 menu.sh:1444 menu.sh:1491 menu.sh:1533
#: menu.sh:1372
msgid "Checking last version"
msgstr "检测新版本中"
#: menu.sh:1377 menu.sh:1452 menu.sh:1499 menu.sh:1541
#: menu.sh:1380
msgid "Error checking new version"
msgstr "检测新版本错误"
#: menu.sh:1383 menu.sh:1458 menu.sh:1505 menu.sh:1547
#: menu.sh:1385
msgid "No new version. Actual version is %s\\nForce update?"
msgstr "没有新版本. 实际版本为 %s\\n强制更新?"
#: menu.sh:1387
msgid "Downloading last version %s"
msgstr "下载新版本 %s 中"
#: menu.sh:1389
msgid "Downloading last version"
msgstr "下载新版本中"
#: menu.sh:1392
msgid "Error downloading update file"
#: menu.sh:1394
msgid "Error downloading new version"
msgstr "下载新版本错误"
#: menu.sh:1398
#: menu.sh:1404 menu.sh:1455
msgid "Extracting last version"
msgstr "解压新版本"
#: menu.sh:1408
msgid "Error extracting update file"
msgstr "更新文件解压错误"
#: menu.sh:1405
#: menu.sh:1415
msgid "Checksum do not match!"
msgstr "Checksum不匹配!"
#: menu.sh:1414
#: menu.sh:1424
msgid ""
"The current version does not support upgrading to the latest update.zip. "
"Please remake the bootloader disk!"
msgstr "当前版本不支持最新的update.zip升级, 请重新制作引导盘!"
#: menu.sh:1419
#: menu.sh:1429
msgid "Installing new files"
msgstr "安装更新中"
#: menu.sh:1436
#: menu.sh:1446
msgid "Arpl updated with success to %s!\\nReboot?"
msgstr "Arpl更新成功 %s!\\n重启?"
#: menu.sh:1462 menu.sh:1509 menu.sh:1551
msgid "Downloading last version"
msgstr "下载新版本中"
#: menu.sh:1466
msgid "Error downloading new version"
msgstr "下载新版本错误"
#: menu.sh:1470 menu.sh:1559
msgid "Extracting last version"
msgstr "解压新版本"
#: menu.sh:1475
#: menu.sh:1461
msgid "Installing new addons"
msgstr "安装新插件中"
@ -1019,74 +991,128 @@ msgstr "安装新插件中"
msgid "Addons updated with success!"
msgstr "插件更新成功!"
#: menu.sh:1513 menu.sh:1555
msgid "Error downloading last version"
msgstr "下载新版本错误"
#: menu.sh:1496
msgid "Update arpl"
msgstr "更新arpl"
#: menu.sh:1528
msgid "Modules updated with success!"
msgstr "模块更新成功!"
#: menu.sh:1497
msgid "Update addons"
msgstr "更新插件"
#: menu.sh:1564
msgid "LKMs updated with success!"
msgstr "LKMs更新成功!"
#: menu.sh:1498
msgid "Update modules"
msgstr "更新模块"
#: menu.sh:1570
#: menu.sh:1499
msgid "Update LKMs"
msgstr "更新LKMs"
#: menu.sh:1500
msgid "Set proxy server"
msgstr "设置代理"
#: menu.sh:1501 menu.sh:1590 menu.sh:1604
msgid "Local upload"
msgstr "本地上传"
#: menu.sh:1507
msgid "arpl"
msgstr "arpl"
#: menu.sh:1515
msgid "addons"
msgstr "插件"
#: menu.sh:1523
msgid "modules"
msgstr "模块"
#: menu.sh:1531
msgid "LKMs"
msgstr "LKMs"
#: menu.sh:1541
msgid "Set Proxy Server"
msgstr "设置代理"
#: menu.sh:1571
#: menu.sh:1542
msgid "Please enter a proxy server url"
msgstr "请输入代理服务器url"
#: menu.sh:1582
#: menu.sh:1553
msgid "Invalid proxy server url, continue?"
msgstr "无效的代理服务器url,是否继续?"
#: menu.sh:1605
#: menu.sh:1568
msgid ""
"Please keep the attachment name consistent with the attachment name on "
"Github.\\n"
msgstr "请保持附件名称与 github 上附件名称一致.\\n"
#: menu.sh:1569
msgid "Upload update.zip will update arpl.\\n"
msgstr "上传 update.zip 将更新 arpl.\\n"
#: menu.sh:1570
msgid "Upload addons.zip will update Addons.\\n"
msgstr "上传 addons.zip 将更新 插件.\\n"
#: menu.sh:1571
msgid "Upload modules.zip will update Modules.\\n"
msgstr "上传 modules.zip 将更新 模块.\\n"
#: menu.sh:1572
msgid "Upload rp-lkms.zip will update LKMs.\\n"
msgstr "上传 rp-lkms.zip 将更新 LKMs.\\n"
#: menu.sh:1591 menu.sh:1605
msgid "Not a valid file, please try again!"
msgstr "不是有效的文件, 请重试!"
#: menu.sh:1625
msgid "Choose a model"
msgstr "选择型号"
#: menu.sh:1607
#: menu.sh:1627
msgid "Choose a Build Number"
msgstr "选择版本"
#: menu.sh:1609
#: menu.sh:1629
msgid "Addons"
msgstr "插件"
#: menu.sh:1611
#: menu.sh:1631
msgid "Cmdline menu"
msgstr "设置Cmdline"
#: menu.sh:1612
#: menu.sh:1632
msgid "Synoinfo menu"
msgstr "设置Synoinfo"
#: menu.sh:1615
#: menu.sh:1635
msgid "Advanced menu"
msgstr "高级设置"
#: menu.sh:1618
#: menu.sh:1638
msgid "Build the loader"
msgstr "编译引导"
#: menu.sh:1622
#: menu.sh:1642
msgid "Boot the loader"
msgstr "启动"
#: menu.sh:1625
#: menu.sh:1645
msgid "Choose a keymap"
msgstr "选择键盘"
#: menu.sh:1627
#: menu.sh:1647
msgid "Clean disk cache"
msgstr "清除磁盘缓存"
#: menu.sh:1629
#: menu.sh:1649
msgid "Update menu"
msgstr "更新"
#: menu.sh:1655
#: menu.sh:1675
msgid "Call \\033[1;32mmenu.sh\\033[0m to return to menu"
msgstr "执行 \\033[1;32mmenu.sh\\033[0m 重新进入设置菜单"

View File

@ -1122,13 +1122,13 @@ function advancedMenu() {
fi
dialog --backtitle "`backtitle`" --colors --aspect 18 \
--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_PATH=/tmp/users
rm -rf ${TMP_PATH}
mkdir -p ${TMP_PATH}
pushd ${TMP_PATH}
TMP_UP_PATH=/tmp/users
rm -rf ${TMP_UP_PATH}
mkdir -p ${TMP_UP_PATH}
pushd ${TMP_UP_PATH}
rz -be
for F in `ls -A`; do
USER_FILE=${TMP_PATH}/${F}
USER_FILE=${TMP_UP_PATH}/${F}
dtc -q -I dts -O dtb ${F} > test.dtb
RET=$?
break
@ -1187,19 +1187,19 @@ function advancedMenu() {
--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=""
TMP_PATH=/tmp/users
rm -rf ${TMP_PATH}
mkdir -p ${TMP_PATH}
pushd ${TMP_PATH}
TMP_UP_PATH=/tmp/users
rm -rf ${TMP_UP_PATH}
mkdir -p ${TMP_UP_PATH}
pushd ${TMP_UP_PATH}
rz -be
for F in `ls -A`; do
USER_FILE="${F}"
[ "${F##*.}" = "zip" -a `unzip -l "${TMP_PATH}/${USER_FILE}" | grep -c "\.img$"` -eq 1 ] && IFTOOL="zip"
[ "${F##*.}" = "zip" -a `unzip -l "${TMP_UP_PATH}/${USER_FILE}" | grep -c "\.img$"` -eq 1 ] && IFTOOL="zip"
[ "${F##*.}" = "gz" -a "${F#*.}" = "img.gz" ] && IFTOOL="gzip"
break
done
popd
if [ -z "${IFTOOL}" -o -z "${TMP_PATH}/${USER_FILE}" ]; then
if [ -z "${IFTOOL}" -o -z "${TMP_UP_PATH}/${USER_FILE}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Restore bootloader disk")" --aspect 18 \
--msgbox "`printf "$(TEXT "Not a valid .zip/.img.gz file, please try again!")" "${USER_FILE}"`" 0 0
else
@ -1210,9 +1210,9 @@ function advancedMenu() {
--infobox "$(TEXT "Writing...")" 0 0
umount /mnt/p1 /mnt/p2 /mnt/p3
if [ "${IFTOOL}" = "zip" ]; then
unzip -p "${TMP_PATH}/${USER_FILE}" | dd of="${LOADER_DISK}" bs=1M conv=fsync
unzip -p "${TMP_UP_PATH}/${USER_FILE}" | dd of="${LOADER_DISK}" bs=1M conv=fsync
elif [ "${IFTOOL}" = "gzip" ]; then
gzip -dc "${TMP_PATH}/${USER_FILE}" | dd of="${LOADER_DISK}" bs=1M conv=fsync
gzip -dc "${TMP_UP_PATH}/${USER_FILE}" | dd of="${LOADER_DISK}" bs=1M conv=fsync
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Restore bootloader disk")" --aspect 18 \
--yesno "`printf "$(TEXT "Restore bootloader disk with success to %s!\nReboot?")" "${USER_FILE}"`" 0 0
@ -1360,60 +1360,58 @@ function keymapMenu() {
loadkeys /usr/share/keymaps/i386/${LAYOUT}/${KEYMAP}.map.gz
}
###############################################################################
function updateMenu() {
PLATFORM="`readModelKey "${MODEL}" "platform"`"
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
# 1 - ext name
# 2 - current version
# 3 - repo url
# 4 - attachment name
function downloadExts() {
PROXY="`readConfigKey "proxy" "${USER_CONFIG_FILE}"`"; [ -n "${PROXY}" ] && [[ "${PROXY: -1}" != "/" ]] && PROXY="${PROXY}/"
while true; do
dialog --backtitle "`backtitle`" --menu "$(TEXT "Choose a option")" 0 0 0 \
a "$(TEXT "Update arpl")" \
d "$(TEXT "Update addons")" \
m "$(TEXT "Update modules")" \
l "$(TEXT "Update LKMs")" \
p "$(TEXT "Set proxy server")" \
e "$(TEXT "Exit")" \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && return
case "`<${TMP_PATH}/resp`" in
a)
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
T="`printf "$(TEXT "Update %s")" "${1}"`"
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--infobox "$(TEXT "Checking last version")" 0 0
# TAG="`curl -skL "${PROXY}https://api.github.com/repos/wjz304/arpl-i18n/releases/latest" | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`"
# 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
LATESTURL="`curl -skL -w %{url_effective} -o /dev/null "${PROXY}https://github.com/wjz304/arpl-i18n/releases/latest"`"
LATESTURL="`curl -skL -w %{url_effective} -o /dev/null "${PROXY}${3}/releases/latest"`"
TAG="${LATESTURL##*/}"
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
if [ -z "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--msgbox "$(TEXT "Error checking new version")" 0 0
continue
return 1
fi
ACTUALVERSION="${ARPL_VERSION}"
if [ "${ACTUALVERSION}" = "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
--yesno "`printf "$(TEXT "No new version. Actual version is %s\nForce update?")" "${ACTUALVERSION}"`" 0 0
[ $? -ne 0 ] && continue
if [ "${2}" = "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--yesno "`printf "$(TEXT "No new version. Actual version is %s\nForce update?")" "${2}"`" 0 0
[ $? -ne 0 ] && return 1
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
--infobox "`printf "$(TEXT "Downloading last version %s")" "${TAG}"`" 0 0
# Download update file
STATUS=`curl -kL -w "%{http_code}" "${PROXY}https://github.com/wjz304/arpl-i18n/releases/download/${TAG}/update.zip" -o "/tmp/update.zip"`
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--infobox "$(TEXT "Downloading last version")" 0 0
rm -f "/tmp/${4}.zip"
STATUS=`curl -kL -w "%{http_code}" "${PROXY}${3}/releases/download/${TAG}/${4}.zip" -o "/tmp/${4}.zip"`
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
--msgbox "$(TEXT "Error downloading update file")" 0 0
continue
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--msgbox "$(TEXT "Error downloading new version")" 0 0
return 1
fi
return 0
}
# 1 - ext name
function updateArpl() {
T="`printf "$(TEXT "Update %s")" "${1}"`"
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--infobox "$(TEXT "Extracting last version")" 0 0
unzip -oq /tmp/update.zip -d /tmp
if [ $? -ne 0 ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--msgbox "$(TEXT "Error extracting update file")" 0 0
continue
fi
# Check checksums
(cd /tmp && sha256sum --status -c sha256sum)
if [ $? -ne 0 ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--msgbox "$(TEXT "Checksum do not match!")" 0 0
continue
fi
@ -1422,12 +1420,12 @@ function updateMenu() {
chmod +x /tmp/update-check.sh
/tmp/update-check.sh
if [ $? -ne 0 ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--msgbox "$(TEXT "The current version does not support upgrading to the latest update.zip. Please remake the bootloader disk!")" 0 0
continue
fi
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--infobox "$(TEXT "Installing new files")" 0 0
# Process update-list.yml
while read F; do
@ -1444,46 +1442,22 @@ function updateMenu() {
mv "/tmp/`basename "${KEY}"`" "${VALUE}"
fi
done < <(readConfigMap "replace" "/tmp/update-list.yml")
dialog --backtitle "`backtitle`" --title "$(TEXT "Update arpl")" --aspect 18 \
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--yesno "`printf "$(TEXT "Arpl updated with success to %s!\nReboot?")" "${TAG}"`" 0 0
[ $? -ne 0 ] && continue
arpl-reboot.sh config
exit
;;
}
d)
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
--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
LATESTURL="`curl -skL -w %{url_effective} -o /dev/null "${PROXY}https://github.com/wjz304/arpl-addons/releases/latest"`"
TAG="${LATESTURL##*/}"
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
if [ -z "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
--msgbox "$(TEXT "Error checking new version")" 0 0
continue
fi
ACTUALVERSION="`cat "/mnt/p3/addons/VERSION" 2>/dev/null`"
if [ "${ACTUALVERSION}" = "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
--yesno "`printf "$(TEXT "No new version. Actual version is %s\nForce update?")" "${ACTUALVERSION}"`" 0 0
[ $? -ne 0 ] && continue
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
--infobox "$(TEXT "Downloading last version")" 0 0
STATUS=`curl -kL -w "%{http_code}" "${PROXY}https://github.com/wjz304/arpl-addons/releases/download/${TAG}/addons.zip" -o "/tmp/addons.zip"`
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
--msgbox "$(TEXT "Error downloading new version")" 0 0
continue
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
# 1 - ext name
function updateExts() {
T="`printf "$(TEXT "Update %s")" "${1}"`"
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--infobox "$(TEXT "Extracting last version")" 0 0
if [ "${1}" = "addons" ]; then
rm -rf /tmp/addons
mkdir -p /tmp/addons
unzip /tmp/addons.zip -d /tmp/addons >/dev/null 2>&1
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--infobox "$(TEXT "Installing new addons")" 0 0
rm -Rf "${ADDONS_PATH}/"*
[ -f /tmp/addons/VERSION ] && cp -f /tmp/addons/VERSION ${ADDONS_PATH}/
@ -1493,41 +1467,9 @@ function updateMenu() {
mkdir -p "${ADDONS_PATH}/${ADDON}"
tar -xaf "${PKG}" -C "${ADDONS_PATH}/${ADDON}" >/dev/null 2>&1
done
DIRTY=1
dialog --backtitle "`backtitle`" --title "$(TEXT "Update addons")" --aspect 18 \
--msgbox "$(TEXT "Addons updated with success!")" 0 0
;;
m)
dialog --backtitle "`backtitle`" --title "$(TEXT "Update modules")" --aspect 18 \
--infobox "$(TEXT "Checking last version")" 0 0
# TAG=`curl -skL "${PROXY}https://api.github.com/repos/wjz304/arpl-modules/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
LATESTURL="`curl -skL -w %{url_effective} -o /dev/null "${PROXY}https://github.com/wjz304/arpl-modules/releases/latest"`"
TAG="${LATESTURL##*/}"
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
if [ -z "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update modules")" --aspect 18 \
--msgbox "$(TEXT "Error checking new version")" 0 0
continue
fi
ACTUALVERSION="`cat "/mnt/p3/modules/VERSION" 2>/dev/null`"
if [ "${ACTUALVERSION}" = "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update modules")" --aspect 18 \
--yesno "`printf "$(TEXT "No new version. Actual version is %s\nForce update?")" "${ACTUALVERSION}"`" 0 0
[ $? -ne 0 ] && continue
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Update modules")" --aspect 18 \
--infobox "$(TEXT "Downloading last version")" 0 0
STATUS=`curl -kL -w "%{http_code}" "${PROXY}https://github.com/wjz304/arpl-modules/releases/download/${TAG}/modules.zip" -o "/tmp/modules.zip"`
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update modules")" --aspect 18 \
--msgbox "$(TEXT "Error downloading last version")" 0 0
continue
fi
elif [ "${1}" = "modules" ]; then
rm "${MODULES_PATH}/"*
unzip /tmp/modules.zip -d "${MODULES_PATH}" >/dev/null 2>&1
# Rebuild modules if model/buildnumber is selected
if [ -n "${PLATFORM}" -a -n "${KVER}" ]; then
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
@ -1535,45 +1477,62 @@ function updateMenu() {
writeConfigKey "modules.${ID}" "" "${USER_CONFIG_FILE}"
done < <(getAllModules "${PLATFORM}" "${KVER}")
fi
elif [ "${1}" = "LKMs" ]; then
rm -rf "${LKM_PATH}/"*
unzip /tmp/rp-lkms.zip -d "${LKM_PATH}" >/dev/null 2>&1
fi
DIRTY=1
dialog --backtitle "`backtitle`" --title "$(TEXT "Update modules")" --aspect 18 \
--msgbox "$(TEXT "Modules updated with success!")" 0 0
dialog --backtitle "`backtitle`" --title "${T}" --aspect 18 \
--msgbox "$(TEXT "Addons updated with success!")" 0 0
}
###############################################################################
function updateMenu() {
PLATFORM="`readModelKey "${MODEL}" "platform"`"
KVER="`readModelKey "${MODEL}" "builds.${BUILD}.kver"`"
PROXY="`readConfigKey "proxy" "${USER_CONFIG_FILE}"`"; [ -n "${PROXY}" ] && [[ "${PROXY: -1}" != "/" ]] && PROXY="${PROXY}/"
while true; do
dialog --backtitle "`backtitle`" --menu "$(TEXT "Choose a option")" 0 0 0 \
a "$(TEXT "Update arpl")" \
d "$(TEXT "Update addons")" \
m "$(TEXT "Update modules")" \
l "$(TEXT "Update LKMs")" \
p "$(TEXT "Set proxy server")" \
u "$(TEXT "Local upload")" \
e "$(TEXT "Exit")" \
2>${TMP_PATH}/resp
[ $? -ne 0 ] && return
case "`<${TMP_PATH}/resp`" in
a)
T="`printf "$(TEXT "Update %s")" "$(TEXT "arpl")"`"
CURVER="${ARPL_VERSION:-0}"
downloadExts "arpl" ${CURVER} "https://github.com/wjz304/arpl-i18n" "update"
[ $? -ne 0 ] && continue
updateArpl "arpl"
;;
d)
T="`printf "$(TEXT "Update %s")" "$(TEXT "addons")"`"
CURVER="`cat "/mnt/p3/addons/VERSION" 2>/dev/null`"
downloadExts "addons" "${CURVER:-0}" "https://github.com/wjz304/arpl-addons" "addons"
[ $? -ne 0 ] && continue
updateExts "addons"
;;
m)
T="`printf "$(TEXT "Update %s")" "$(TEXT "modules")"`"
CURVER="`cat "/mnt/p3/modules/VERSION" 2>/dev/null`"
downloadExts "modules" "${CURVER:-0}" "https://github.com/wjz304/arpl-modules" "modules"
[ $? -ne 0 ] && continue
updateExts "modules"
;;
l)
dialog --backtitle "`backtitle`" --title "$(TEXT "Update LKMs")" --aspect 18 \
--infobox "$(TEXT "Checking last version")" 0 0
# TAG=`curl -skL "${PROXY}https://api.github.com/repos/wjz304/redpill-lkm/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
LATESTURL="`curl -skL -w %{url_effective} -o /dev/null "${PROXY}https://github.com/wjz304/redpill-lkm/releases/latest"`"
TAG="${LATESTURL##*/}"
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
if [ -z "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update LKMs")" --aspect 18 \
--msgbox "$(TEXT "Error checking new version")" 0 0
continue
fi
ACTUALVERSION="`cat "/mnt/p3/lkms/VERSION" 2>/dev/null`"
if [ "${ACTUALVERSION}" = "${TAG}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update LKMs")" --aspect 18 \
--yesno "`printf "$(TEXT "No new version. Actual version is %s\nForce update?")" "${ACTUALVERSION}"`" 0 0
T="`printf "$(TEXT "Update %s")" "$(TEXT "LKMs")"`"
CURVER="`cat "/mnt/p3/lkms/VERSION" 2>/dev/null`"
downloadExts "LKMs" "${CURVER:-0}" "https://github.com/wjz304/redpill-lkm" "rp-lkms"
[ $? -ne 0 ] && continue
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Update LKMs")" --aspect 18 \
--infobox "$(TEXT "Downloading last version")" 0 0
STATUS=`curl -kL -w "%{http_code}" "${PROXY}https://github.com/wjz304/redpill-lkm/releases/download/${TAG}/rp-lkms.zip" -o "/tmp/rp-lkms.zip"`
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Update LKMs")" --aspect 18 \
--msgbox "$(TEXT "Error downloading last version")" 0 0
continue
fi
dialog --backtitle "`backtitle`" --title "$(TEXT "Update LKMs")" --aspect 18 \
--infobox "$(TEXT "Extracting last version")" 0 0
rm -rf "${LKM_PATH}/"*
unzip /tmp/rp-lkms.zip -d "${LKM_PATH}" >/dev/null 2>&1
DIRTY=1
dialog --backtitle "`backtitle`" --title "$(TEXT "Update LKMs")" --aspect 18 \
--msgbox "$(TEXT "LKMs updated with success!")" 0 0
updateExts "LKMs"
;;
p)
@ -1598,6 +1557,55 @@ function updateMenu() {
done
[ ${RET} -eq 0 ] && writeConfigKey "proxy" "${PROXY}" "${USER_CONFIG_FILE}"
;;
u)
if ! tty | grep -q "/dev/pts"; then
dialog --backtitle "`backtitle`" --colors --aspect 18 \
--msgbox "$(TEXT "This feature is only available when accessed via web/ssh.")" 0 0
return
fi
MSG=""
MSG+="$(TEXT "Please keep the attachment name consistent with the attachment name on Github.\n")"
MSG+="$(TEXT "Upload update.zip will update arpl.\n")"
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`" --colors --aspect 18 \
--msgbox "${MSG}" 0 0
EXTS=("update.zip" "addons.zip" "modules.zip" "rp-lkms.zip")
TMP_UP_PATH=/tmp/users
USER_FILE=""
rm -rf ${TMP_UP_PATH}
mkdir -p ${TMP_UP_PATH}
pushd ${TMP_UP_PATH}
rz -be
for F in `ls -A`; do
for I in ${EXTS[@]}; do
[[ "${I}" == "${F}" ]] && USER_FILE=${F}
done
break
done
popd
if [ -z "${USER_FILE}" ]; then
dialog --backtitle "`backtitle`" --title "$(TEXT "Local upload")" --aspect 18 \
--msgbox "$(TEXT "Not a valid file, please try again!")" 0 0
else
rm /tmp/${USER_FILE}
mv ${TMP_UP_PATH}/${USER_FILE} /tmp/${USER_FILE}
if [ "${USER_FILE}" = "update.zip" ]; then
updateArpl "arpl"
elif [ "${USER_FILE}" = "addons.zip" ]; then
updateExts "addons"
elif [ "${USER_FILE}" = "modules.zip" ]; then
updateExts "modules"
elif [ "${USER_FILE}" = "rp-lkms.zip" ]; then
updateExts "LKMs"
else
dialog --backtitle "`backtitle`" --title "$(TEXT "Local upload")" --aspect 18 \
--msgbox "$(TEXT "Not a valid file, please try again!")" 0 0
fi
fi
;;
e) return ;;
esac
done