mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
When there is no custom macs, remove the incoming data in cmdline.
This commit is contained in:
parent
57a18d9dae
commit
0b344ac8af
@ -60,7 +60,7 @@ fi
|
|||||||
declare -A CMDLINE
|
declare -A CMDLINE
|
||||||
|
|
||||||
# Fixed values
|
# Fixed values
|
||||||
CMDLINE['netif_num']=0
|
#CMDLINE['netif_num']=0
|
||||||
# Automatic values
|
# Automatic values
|
||||||
CMDLINE['syno_hw_version']="${MODEL}"
|
CMDLINE['syno_hw_version']="${MODEL}"
|
||||||
[ -z "${VID}" ] && VID="0x0000" # Sanity check
|
[ -z "${VID}" ] && VID="0x0000" # Sanity check
|
||||||
@ -97,10 +97,12 @@ for N in `seq 1 8`; do # Currently, only up to 8 are supported. (<==> menu.sh
|
|||||||
[ -n "${CMDLINE["mac${N}"]}" ] && MACS+=(${CMDLINE["mac${N}"]})
|
[ -n "${CMDLINE["mac${N}"]}" ] && MACS+=(${CMDLINE["mac${N}"]})
|
||||||
done
|
done
|
||||||
NETIF_NUM=${#MACS[*]}
|
NETIF_NUM=${#MACS[*]}
|
||||||
|
NETRL_NUM=`ls /sys/class/net/ | grep eth | wc -l` # real network cards amount
|
||||||
|
if [ ${NETIF_NUM} -eq 0 ]; then
|
||||||
|
echo -e "\033[1;33m*** `printf "$(TEXT "Detected %s network cards, but No MACs were customized, they will use the original MACs.")" "${NETRL_NUM}"` ***\033[0m"
|
||||||
|
else
|
||||||
# set netif_num to custom mac amount, netif_num must be equal to the MACX amount, otherwise the kernel will panic.
|
# set netif_num to custom mac amount, netif_num must be equal to the MACX amount, otherwise the kernel will panic.
|
||||||
CMDLINE["netif_num"]=${NETIF_NUM} # The current original CMDLINE['netif_num'] is no longer in use, Consider deleting.
|
CMDLINE["netif_num"]=${NETIF_NUM} # The current original CMDLINE['netif_num'] is no longer in use, Consider deleting.
|
||||||
# real network cards amount
|
|
||||||
NETRL_NUM=`ls /sys/class/net/ | grep eth | wc -l`
|
|
||||||
if [ ${NETIF_NUM} -le ${NETRL_NUM} ]; then
|
if [ ${NETIF_NUM} -le ${NETRL_NUM} ]; then
|
||||||
echo -e "\033[1;33m*** `printf "$(TEXT "Detected %s network cards, but only %s MACs were customized, the rest will use the original MACs.")" "${NETRL_NUM}" "${CMDLINE["netif_num"]}"` ***\033[0m"
|
echo -e "\033[1;33m*** `printf "$(TEXT "Detected %s network cards, but only %s MACs were customized, the rest will use the original MACs.")" "${NETRL_NUM}" "${CMDLINE["netif_num"]}"` ***\033[0m"
|
||||||
ETHX=(`ls /sys/class/net/ | grep eth`) # real network cards list
|
ETHX=(`ls /sys/class/net/ | grep eth`) # real network cards list
|
||||||
@ -114,6 +116,7 @@ if [ ${NETIF_NUM} -le ${NETRL_NUM} ]; then
|
|||||||
done
|
done
|
||||||
CMDLINE["netif_num"]=${NETRL_NUM}
|
CMDLINE["netif_num"]=${NETRL_NUM}
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Prepare command line
|
# Prepare command line
|
||||||
CMDLINE_LINE=""
|
CMDLINE_LINE=""
|
||||||
|
@ -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-22 13:55+0800\n"
|
"POT-Creation-Date: 2023-05-27 11:44+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"
|
||||||
@ -63,49 +63,55 @@ 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:105
|
#: boot.sh:102
|
||||||
|
msgid ""
|
||||||
|
"Detected %s network cards, but No MACs were customized, they will use the "
|
||||||
|
"original MACs."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: boot.sh:107
|
||||||
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:135
|
#: boot.sh:138
|
||||||
msgid "Cmdline:\\n"
|
msgid "Cmdline:\\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: boot.sh:140
|
#: boot.sh:143
|
||||||
msgid "Reboot to boot directly in DSM"
|
msgid "Reboot to boot directly in DSM"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: boot.sh:146 init.sh:175
|
#: boot.sh:149 init.sh:175
|
||||||
msgid "Detected %s network cards, Waiting IP."
|
msgid "Detected %s network cards, Waiting IP."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: boot.sh:152 init.sh:181
|
#: boot.sh:155 init.sh:181
|
||||||
msgid "DOWN"
|
msgid "DOWN"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: boot.sh:156 init.sh:185
|
#: boot.sh:159 init.sh:185
|
||||||
msgid "ERROR"
|
msgid "ERROR"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: boot.sh:162
|
#: boot.sh:165
|
||||||
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:171
|
#: boot.sh:174
|
||||||
msgid "Loading DSM kernel..."
|
msgid "Loading DSM kernel..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: boot.sh:175
|
#: boot.sh:178
|
||||||
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:180
|
#: boot.sh:183
|
||||||
msgid "Booting..."
|
msgid "Booting..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: boot.sh:183
|
#: boot.sh:186
|
||||||
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.]"
|
||||||
|
Binary file not shown.
@ -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-22 13:55+0800\n"
|
"POT-Creation-Date: 2023-05-27 11:44+0800\n"
|
||||||
"PO-Revision-Date: 2023-05-22 13:56+0800\n"
|
"PO-Revision-Date: 2023-05-27 11:45+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"
|
||||||
@ -62,49 +62,55 @@ 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:105
|
#: boot.sh:102
|
||||||
|
msgid ""
|
||||||
|
"Detected %s network cards, but No MACs were customized, they will use the "
|
||||||
|
"original MACs."
|
||||||
|
msgstr "检测到 %s 个网卡, 但是没有自定义 MACs, 它们将使用自身 MACs."
|
||||||
|
|
||||||
|
#: boot.sh:107
|
||||||
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:135
|
#: boot.sh:138
|
||||||
msgid "Cmdline:\\n"
|
msgid "Cmdline:\\n"
|
||||||
msgstr "Cmdline:\\n"
|
msgstr "Cmdline:\\n"
|
||||||
|
|
||||||
#: boot.sh:140
|
#: boot.sh:143
|
||||||
msgid "Reboot to boot directly in DSM"
|
msgid "Reboot to boot directly in DSM"
|
||||||
msgstr "重启并直接进入DSM引导"
|
msgstr "重启并直接进入DSM引导"
|
||||||
|
|
||||||
#: boot.sh:146 init.sh:175
|
#: boot.sh:149 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:152 init.sh:181
|
#: boot.sh:155 init.sh:181
|
||||||
msgid "DOWN"
|
msgid "DOWN"
|
||||||
msgstr "卸载"
|
msgstr "卸载"
|
||||||
|
|
||||||
#: boot.sh:156 init.sh:185
|
#: boot.sh:159 init.sh:185
|
||||||
msgid "ERROR"
|
msgid "ERROR"
|
||||||
msgstr "错误"
|
msgstr "错误"
|
||||||
|
|
||||||
#: boot.sh:162
|
#: boot.sh:165
|
||||||
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:171
|
#: boot.sh:174
|
||||||
msgid "Loading DSM kernel..."
|
msgid "Loading DSM kernel..."
|
||||||
msgstr "加载 DSM kernel..."
|
msgstr "加载 DSM kernel..."
|
||||||
|
|
||||||
#: boot.sh:175
|
#: boot.sh:178
|
||||||
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:180
|
#: boot.sh:183
|
||||||
msgid "Booting..."
|
msgid "Booting..."
|
||||||
msgstr "引导中..."
|
msgstr "引导中..."
|
||||||
|
|
||||||
#: boot.sh:183
|
#: boot.sh:186
|
||||||
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.]"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user