Skip to content

Commit

Permalink
format ID_BUS
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Jul 11, 2023
1 parent 4119576 commit eb2e33e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion files/board/arpl/overlayfs/opt/arpl/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ done
# Get the VID/PID if we are in USB
VID="0x0000"
PID="0x0000"
BUS=$(udevadm info --query property --name ${LOADER_DISK} | grep BUS | cut -d= -f2)
BUS=$(udevadm info --query property --name ${LOADER_DISK} | grep ID_BUS | cut -d= -f2)
if [ "${BUS}" = "usb" ]; then
VID="0x$(udevadm info --query property --name ${LOADER_DISK} | grep ID_VENDOR_ID | cut -d= -f2)"
PID="0x$(udevadm info --query property --name ${LOADER_DISK} | grep ID_MODEL_ID | cut -d= -f2)"
Expand Down
4 changes: 2 additions & 2 deletions files/board/arpl/overlayfs/opt/arpl/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ function productversMenu() {
--msgbox "$(TEXT "This version does not support UEFI startup, Please select another version or switch the startup mode.")" 0 0
return
fi
if [ ! "usb" = "$(udevadm info --query property --name ${LOADER_DISK} | grep BUS | cut -d= -f2)" -a "${KVER:0:1}" = "5" ]; then
if [ ! "usb" = "$(udevadm info --query property --name ${LOADER_DISK} | grep ID_BUS | cut -d= -f2)" -a "${KVER:0:1}" = "5" ]; then
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \
--msgbox "$(TEXT "This version only support usb startup, Please select another version or switch the startup mode.")" 0 0
return
fi
# get online pat data
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \
--infobox "$(TEXT "Get online pat data ..")" 0 0
idx=1
idx=0
while [ $idx -le 3 ]; do # Loop 3 times, if successful, break
speed_a=$(ping -c 1 -W 5 www.synology.com | awk '/time=/ {print $7}' | cut -d '=' -f 2)
speed_b=$(ping -c 1 -W 5 www.synology.cn | awk '/time=/ {print $7}' | cut -d '=' -f 2)
Expand Down

0 comments on commit eb2e33e

Please sign in to comment.