Skip to content

Commit

Permalink
Refactor menu.sh to uppercase serial number and MAC addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Sep 6, 2024
1 parent ead32a8 commit a96b655
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions files/initrd/opt/rr/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,9 @@ function cmdlineMenu() {
RET=$?
case ${RET} in
0) # ok-button
sn="$(cat "${TMP_PATH}/resp" | sed -n '1p')"
mac1="$(cat "${TMP_PATH}/resp" | sed -n '2p' | sed 's/[:-]//g')"
mac2="$(cat "${TMP_PATH}/resp" | sed -n '3p' | sed 's/[:-]//g')"
sn="$(cat "${TMP_PATH}/resp" | sed -n '1p' | sed 's/.*/\U&/')"
mac1="$(cat "${TMP_PATH}/resp" | sed -n '2p' | sed 's/[:-]//g' | sed 's/.*/\U&/')"
mac2="$(cat "${TMP_PATH}/resp" | sed -n '3p' | sed 's/[:-]//g' | sed 's/.*/\U&/')"
if [ -z "${sn}" -o -z "${mac1}" ]; then
DIALOG --title "$(TEXT "Cmdline")" \
--yesno "$(TEXT "Invalid SN/MAC, retry?")" 0 0
Expand Down

0 comments on commit a96b655

Please sign in to comment.