Add a prompt for 'multiple loader disks'

This commit is contained in:
Ing 2023-06-01 00:03:06 +08:00
parent 358e6ec16b
commit dc56b7a0d0
4 changed files with 70 additions and 62 deletions

View File

@ -13,13 +13,13 @@ while true; do
CNT=$((${CNT}-1)) CNT=$((${CNT}-1))
sleep 1 sleep 1
done done
if [ -z "${LOADER_DISK}" ]; then
die "$(TEXT "Loader disk not found!")"
fi [ -z "${LOADER_DISK}" ] && die "$(TEXT "Loader disk not found!")"
NUM_PARTITIONS=$(blkid | grep "${LOADER_DISK}[0-9]\+" | cut -d: -f1 | wc -l) NUM_PARTITIONS=$(blkid | grep "${LOADER_DISK}[0-9]\+" | cut -d: -f1 | wc -l)
if [ $NUM_PARTITIONS -ne 3 ]; then [ $NUM_PARTITIONS -lt 3 ] && die "$(TEXT "Loader disk seems to be damaged!")"
die "$(TEXT "Loader disk not found!")" [ $NUM_PARTITIONS -gt 3 ] && die "$(TEXT "There are multiple loader disks, please insert only one loader disk!")"
fi
# Check partitions and ignore errors # Check partitions and ignore errors
fsck.vfat -aw ${LOADER_DISK}1 >/dev/null 2>&1 || true fsck.vfat -aw ${LOADER_DISK}1 >/dev/null 2>&1 || true

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-27 13:56+0800\n" "POT-Creation-Date: 2023-05-31 23:56+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,106 +21,110 @@ msgstr ""
msgid "Loader is not configured!" msgid "Loader is not configured!"
msgstr "" msgstr ""
#: boot.sh:13 init.sh:43 #: boot.sh:19 init.sh:43
msgid "Welcome to %s" msgid "Welcome to %s"
msgstr "" msgstr ""
#: boot.sh:18 #: boot.sh:32
msgid "BOOTING..."
msgstr ""
#: boot.sh:24
msgid "DSM zImage changed" msgid "DSM zImage changed"
msgstr "" msgstr ""
#: boot.sh:27 boot.sh:39 menu.sh:717 menu.sh:743 menu.sh:812 menu.sh:823 #: boot.sh:35 boot.sh:47 menu.sh:717 menu.sh:743 menu.sh:812 menu.sh:823
#: menu.sh:852 menu.sh:865 menu.sh:872 menu.sh:1046 menu.sh:1141 #: menu.sh:852 menu.sh:865 menu.sh:872 menu.sh:1046 menu.sh:1141
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: boot.sh:28 menu.sh:866 #: boot.sh:36 menu.sh:866
msgid "zImage not patched:\\n" msgid "zImage not patched:\\n"
msgstr "" msgstr ""
#: boot.sh:36 #: boot.sh:44
msgid "DSM Ramdisk changed" msgid "DSM Ramdisk changed"
msgstr "" msgstr ""
#: boot.sh:40 menu.sh:873 #: boot.sh:48 menu.sh:873
msgid "Ramdisk not patched:\\n" msgid "Ramdisk not patched:\\n"
msgstr "" msgstr ""
#: boot.sh:52 #: boot.sh:60
msgid "Model:" msgid "Model:"
msgstr "" msgstr ""
#: boot.sh:53 #: boot.sh:61
msgid "Build:" msgid "Build:"
msgstr "" msgstr ""
#: boot.sh:56 #: boot.sh:64
msgid "" msgid ""
"The current version of arpl does not support booting %s-%s, please rebuild." "The current version of arpl does not support booting %s-%s, please rebuild."
msgstr "" msgstr ""
#: boot.sh:102 #: boot.sh:106
msgid "" msgid ""
"Detected %s network cards, but No MACs were customized, they will use the " "Detected %s network cards, but No MACs were customized, they will use the "
"original MACs." "original MACs."
msgstr "" msgstr ""
#: boot.sh:107 #: boot.sh:111
msgid "" msgid ""
"Detected %s network cards, but only %s MACs were customized, the rest will " "Detected %s network cards, but only %s MACs were customized, the rest will "
"use the original MACs." "use the original MACs."
msgstr "" msgstr ""
#: boot.sh:138 #: boot.sh:142
msgid "Cmdline:\\n" msgid "Cmdline:\\n"
msgstr "" msgstr ""
#: boot.sh:143 #: boot.sh:147
msgid "Reboot to boot directly in DSM" msgid "Reboot to boot directly in DSM"
msgstr "" msgstr ""
#: boot.sh:149 init.sh:175 #: boot.sh:153 init.sh:175
msgid "Detected %s network cards, Waiting IP." msgid "Detected %s network cards, Waiting IP."
msgstr "" msgstr ""
#: boot.sh:155 init.sh:181 #: boot.sh:160 init.sh:181
msgid "DOWN" msgid "DOWN"
msgstr "" msgstr ""
#: boot.sh:159 init.sh:185 #: boot.sh:164 init.sh:185
msgid "ERROR" msgid "ERROR"
msgstr "" msgstr ""
#: boot.sh:165 #: boot.sh:170
msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web." msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web."
msgstr "" msgstr ""
#: boot.sh:174 #: boot.sh:179
msgid "Loading DSM kernel..." msgid "Loading DSM kernel..."
msgstr "" msgstr ""
#: boot.sh:178 #: boot.sh:183
msgid "Warning, running kexec with --noefi param, strange things will happen!!" msgid "Warning, running kexec with --noefi param, strange things will happen!!"
msgstr "" msgstr ""
#: boot.sh:183 #: boot.sh:188
msgid "Booting..." msgid "Booting..."
msgstr "" msgstr ""
#: boot.sh:186 #: boot.sh:191
msgid "" msgid ""
"[This interface will not be operational. Please use the http://find.synology." "[This interface will not be operational. Please use the http://find.synology."
"com/ find DSM and connect.]" "com/ find DSM and connect.]"
msgstr "" msgstr ""
#: init.sh:17 init.sh:21 #: init.sh:18
msgid "Loader disk not found!" msgid "Loader disk not found!"
msgstr "" msgstr ""
#: init.sh:20
msgid "Loader disk seems to be damaged!"
msgstr ""
#: init.sh:21
msgid "There are multiple loader disks, please insert only one loader disk!"
msgstr ""
#: init.sh:34 init.sh:35 init.sh:36 #: init.sh:34 init.sh:35 init.sh:36
msgid "Can't mount %s" msgid "Can't mount %s"
msgstr "" msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: arpl-i18n\n" "Project-Id-Version: arpl-i18n\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-27 13:56+0800\n" "POT-Creation-Date: 2023-05-31 23:56+0800\n"
"PO-Revision-Date: 2023-05-27 13:56+0800\n" "PO-Revision-Date: 2023-05-31 23:56+0800\n"
"Last-Translator: ing <wjz304@qq.com>\n" "Last-Translator: ing <wjz304@qq.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n" "Language: zh_CN\n"
@ -20,105 +20,109 @@ msgstr ""
msgid "Loader is not configured!" msgid "Loader is not configured!"
msgstr "引导未配置" msgstr "引导未配置"
#: boot.sh:13 init.sh:43 #: boot.sh:19 init.sh:43
msgid "Welcome to %s" msgid "Welcome to %s"
msgstr "" msgstr ""
#: boot.sh:18 #: boot.sh:32
msgid "BOOTING..."
msgstr "引导"
#: boot.sh:24
msgid "DSM zImage changed" msgid "DSM zImage changed"
msgstr "DSM zImage 已更改" msgstr "DSM zImage 已更改"
#: boot.sh:27 boot.sh:39 menu.sh:717 menu.sh:743 menu.sh:812 menu.sh:823 #: boot.sh:35 boot.sh:47 menu.sh:717 menu.sh:743 menu.sh:812 menu.sh:823
#: menu.sh:852 menu.sh:865 menu.sh:872 menu.sh:1046 menu.sh:1141 #: menu.sh:852 menu.sh:865 menu.sh:872 menu.sh:1046 menu.sh:1141
msgid "Error" msgid "Error"
msgstr "错误" msgstr "错误"
#: boot.sh:28 menu.sh:866 #: boot.sh:36 menu.sh:866
msgid "zImage not patched:\\n" msgid "zImage not patched:\\n"
msgstr "zImage打补丁失败:\\n" msgstr "zImage打补丁失败:\\n"
#: boot.sh:36 #: boot.sh:44
msgid "DSM Ramdisk changed" msgid "DSM Ramdisk changed"
msgstr "DSM Ramdisk 已更改" msgstr "DSM Ramdisk 已更改"
#: boot.sh:40 menu.sh:873 #: boot.sh:48 menu.sh:873
msgid "Ramdisk not patched:\\n" msgid "Ramdisk not patched:\\n"
msgstr "Ramdisk打补丁失败:\\n" msgstr "Ramdisk打补丁失败:\\n"
#: boot.sh:52 #: boot.sh:60
msgid "Model:" msgid "Model:"
msgstr "型号: " msgstr "型号: "
#: boot.sh:53 #: boot.sh:61
msgid "Build:" msgid "Build:"
msgstr "版本: " msgstr "版本: "
#: boot.sh:56 #: boot.sh:64
msgid "" msgid ""
"The current version of arpl does not support booting %s-%s, please rebuild." "The current version of arpl does not support booting %s-%s, please rebuild."
msgstr "当前版本的arpl不支持引导 %s-%s, 请重新编译." msgstr "当前版本的arpl不支持引导 %s-%s, 请重新编译."
#: boot.sh:102 #: boot.sh:106
msgid "" msgid ""
"Detected %s network cards, but No MACs were customized, they will use the " "Detected %s network cards, but No MACs were customized, they will use the "
"original MACs." "original MACs."
msgstr "检测到 %s 个网卡, 但是没有自定义 MACs, 它们将使用自身 MACs." msgstr "检测到 %s 个网卡, 但是没有自定义 MACs, 它们将使用自身 MACs."
#: boot.sh:107 #: boot.sh:111
msgid "" msgid ""
"Detected %s network cards, but only %s MACs were customized, the rest will " "Detected %s network cards, but only %s MACs were customized, the rest will "
"use the original MACs." "use the original MACs."
msgstr "检测到 %s 个网卡, 但是仅自定义了 %s 个 MACs, 其他网卡将使用自身 MACs." msgstr "检测到 %s 个网卡, 但是仅自定义了 %s 个 MACs, 其他网卡将使用自身 MACs."
#: boot.sh:138 #: boot.sh:142
msgid "Cmdline:\\n" msgid "Cmdline:\\n"
msgstr "Cmdline:\\n" msgstr "Cmdline:\\n"
#: boot.sh:143 #: boot.sh:147
msgid "Reboot to boot directly in DSM" msgid "Reboot to boot directly in DSM"
msgstr "重启并直接进入DSM引导" msgstr "重启并直接进入DSM引导"
#: boot.sh:149 init.sh:175 #: boot.sh:153 init.sh:175
msgid "Detected %s network cards, Waiting IP." msgid "Detected %s network cards, Waiting IP."
msgstr "检测到 %s 个网卡, 获取 IP." msgstr "检测到 %s 个网卡, 获取 IP."
#: boot.sh:155 init.sh:181 #: boot.sh:160 init.sh:181
msgid "DOWN" msgid "DOWN"
msgstr "卸载" msgstr "卸载"
#: boot.sh:159 init.sh:185 #: boot.sh:164 init.sh:185
msgid "ERROR" msgid "ERROR"
msgstr "错误" msgstr "错误"
#: boot.sh:165 #: boot.sh:170
msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web." msgid "Access \\033[1;34mhttp://%s:5000\\033[0m to connect the DSM via web."
msgstr "在浏览器中访问 \\033[1;34mhttp://%s:5000\\033[0m 链接 DSM." msgstr "在浏览器中访问 \\033[1;34mhttp://%s:5000\\033[0m 链接 DSM."
#: boot.sh:174 #: boot.sh:179
msgid "Loading DSM kernel..." msgid "Loading DSM kernel..."
msgstr "加载 DSM kernel..." msgstr "加载 DSM kernel..."
#: boot.sh:178 #: boot.sh:183
msgid "Warning, running kexec with --noefi param, strange things will happen!!" msgid "Warning, running kexec with --noefi param, strange things will happen!!"
msgstr "警告, 使用'--noefi'参数运行'kexec', 可能有不好的事情发生!!" msgstr "警告, 使用'--noefi'参数运行'kexec', 可能有不好的事情发生!!"
#: boot.sh:183 #: boot.sh:188
msgid "Booting..." msgid "Booting..."
msgstr "引导中..." msgstr "引导中..."
#: boot.sh:186 #: boot.sh:191
msgid "" msgid ""
"[This interface will not be operational. Please use the http://find.synology." "[This interface will not be operational. Please use the http://find.synology."
"com/ find DSM and connect.]" "com/ find DSM and connect.]"
msgstr "该界面已不可操作, 请通过 http://find.synology.com/ 查找DSM并链接." msgstr "该界面已不可操作, 请通过 http://find.synology.com/ 查找DSM并链接."
#: init.sh:17 init.sh:21 #: init.sh:18
msgid "Loader disk not found!" msgid "Loader disk not found!"
msgstr "引导磁盘未找到" msgstr "引导磁盘未找到!"
#: init.sh:20
msgid "Loader disk seems to be damaged!"
msgstr "引导磁盘似乎已损坏!"
#: init.sh:21
msgid "There are multiple loader disks, please insert only one loader disk!"
msgstr "存在多个引导磁盘,请仅插入一个引导磁盘!"
#: init.sh:34 init.sh:35 init.sh:36 #: init.sh:34 init.sh:35 init.sh:36
msgid "Can't mount %s" msgid "Can't mount %s"