mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
format ID_BUS
This commit is contained in:
parent
6b065673f8
commit
0daa4e8b20
@ -119,7 +119,7 @@ done
|
|||||||
# Get the VID/PID if we are in USB
|
# Get the VID/PID if we are in USB
|
||||||
VID="0x0000"
|
VID="0x0000"
|
||||||
PID="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
|
if [ "${BUS}" = "usb" ]; then
|
||||||
VID="0x$(udevadm info --query property --name ${LOADER_DISK} | grep ID_VENDOR_ID | cut -d= -f2)"
|
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)"
|
PID="0x$(udevadm info --query property --name ${LOADER_DISK} | grep ID_MODEL_ID | cut -d= -f2)"
|
||||||
|
@ -167,7 +167,7 @@ function productversMenu() {
|
|||||||
--msgbox "$(TEXT "This version does not support UEFI startup, Please select another version or switch the startup mode.")" 0 0
|
--msgbox "$(TEXT "This version does not support UEFI startup, Please select another version or switch the startup mode.")" 0 0
|
||||||
return
|
return
|
||||||
fi
|
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")" \
|
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
|
--msgbox "$(TEXT "This version only support usb startup, Please select another version or switch the startup mode.")" 0 0
|
||||||
return
|
return
|
||||||
@ -175,7 +175,7 @@ function productversMenu() {
|
|||||||
# get online pat data
|
# get online pat data
|
||||||
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \
|
dialog --backtitle "$(backtitle)" --colors --title "$(TEXT "Product Version")" \
|
||||||
--infobox "$(TEXT "Get online pat data ..")" 0 0
|
--infobox "$(TEXT "Get online pat data ..")" 0 0
|
||||||
idx=1
|
idx=0
|
||||||
while [ $idx -le 3 ]; do # Loop 3 times, if successful, break
|
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_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)
|
speed_b=$(ping -c 1 -W 5 www.synology.cn | awk '/time=/ {print $7}' | cut -d '=' -f 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user