Skip to content

Commit

Permalink
chore: add sn of RS2423RP+, thanks @OrpheeGT
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Sep 6, 2024
1 parent e57959a commit 6fe5bab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
16 changes: 8 additions & 8 deletions files/initrd/opt/rr/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,8 @@ function cmdlineMenu() {
case ${RET} in
0) # ok-button
sn="$(cat "${TMP_PATH}/resp" | sed -n '1p')"
mac1="$(cat "${TMP_PATH}/resp" | sed -n '2p')"
mac2="$(cat "${TMP_PATH}/resp" | sed -n '3p')"
mac1="$(cat "${TMP_PATH}/resp" | sed -n '2p' | sed 's/[:-]//g')"
mac2="$(cat "${TMP_PATH}/resp" | sed -n '3p' | sed 's/[:-]//g')"
if [ -z "${sn}" -o -z "${mac1}" ]; then
DIALOG --title "$(TEXT "Cmdline")" \
--yesno "$(TEXT "Invalid SN/MAC, retry?")" 0 0
Expand Down Expand Up @@ -2361,7 +2361,6 @@ function advancedMenu() {
if [ -n "${PLATFORM}" ] && [ "true" = "$(readConfigKey "platforms.${PLATFORM}.dt" "${WORK_PATH}/platforms.yml")" ]; then
echo "d \"$(TEXT "Custom DTS")\"" >>"${TMP_PATH}/menu"
fi
echo "q \"$(TEXT "Switch direct boot:") \Z4${DIRECTBOOT}\Zn\"" >>"${TMP_PATH}/menu"
if [ "${DIRECTBOOT}" = "false" ]; then
echo "i \"$(TEXT "Timeout of get ip in boot:") \Z4${BOOTIPWAIT}\Zn\"" >>"${TMP_PATH}/menu"
echo "w \"$(TEXT "Timeout of boot wait:") \Z4${BOOTWAIT}\Zn\"" >>"${TMP_PATH}/menu"
Expand Down Expand Up @@ -2457,11 +2456,6 @@ function advancedMenu() {
customDTS
NEXT="e"
;;
q)
[ "${DIRECTBOOT}" = "false" ] && DIRECTBOOT='true' || DIRECTBOOT='false'
writeConfigKey "directboot" "${DIRECTBOOT}" "${USER_CONFIG_FILE}"
NEXT="q"
;;
i)
ITEMS="$(echo -e "1 \n5 \n10 \n30 \n60 \n")"
DIALOG --title "$(TEXT "Advanced")" \
Expand Down Expand Up @@ -3498,6 +3492,7 @@ else
fi
fi
if loaderIsConfigured; then
echo "q \"$(TEXT "Direct boot:") \Z4${DIRECTBOOT}\Zn\"" >>"${TMP_PATH}/menu"
echo "b \"$(TEXT "Boot the loader")\"" >>"${TMP_PATH}/menu"
fi
echo "l \"$(TEXT "Choose a language")\"" >>"${TMP_PATH}/menu"
Expand Down Expand Up @@ -3569,6 +3564,11 @@ else
make
NEXT="b"
;;
q)
[ "${DIRECTBOOT}" = "false" ] && DIRECTBOOT='true' || DIRECTBOOT='false'
writeConfigKey "directboot" "${DIRECTBOOT}" "${USER_CONFIG_FILE}"
NEXT="q"
;;
b)
boot && exit 0 || sleep 5
;;
Expand Down
7 changes: 7 additions & 0 deletions files/initrd/opt/rr/serialnumber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@
middle:
- "QPR"
suffix: "alpha"
"RS2423RP+":
prefix:
- "22B0"
middle:
- "V3R"
suffix: "alpha"
macpre: 9009d0
"RS3621xs+":
prefix:
- "20A0"
Expand Down

0 comments on commit 6fe5bab

Please sign in to comment.