Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usr/share/rear/prep/USB/Linux-i386/350_check_usb_disk.sh - if we pass… #2172

Merged
merged 2 commits into from
Jul 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion usr/share/rear/prep/USB/Linux-i386/350_check_usb_disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ if [ "$TEMP_USB_DEVICE" -a -b "/dev/$TEMP_USB_DEVICE" ]; then
RAW_USB_DEVICE="/dev/$(my_udevinfo -q name -n "$TEMP_USB_DEVICE")"
elif [ "$TEMP_USB_DEVICE" -a -d "/sys/block/$TEMP_USB_DEVICE" ]; then
RAW_USB_DEVICE="/dev/$(my_udevinfo -q name -p "$TEMP_USB_DEVICE")"
elif [ -z "$TEMP_USB_DEVICE" ]; then

# If we're passed a raw device, ala /dev/sdb, TEMP_USB_DEVICE will be set to "block"
# and RAW_USB_DEVICE won't be set. "block" is not useful. TEMP_USB_DEVICE will not be
# set if udev doesn't know anything about the device we were passed. So, if we've
# gotten here and either are not set, let's just assert what we know from udev
# about the device.
elif [ -z "$TEMP_USB_DEVICE" ] || [ -z "$RAW_USB_DEVICE" ] ; then
RAW_USB_DEVICE="/dev/$(my_udevinfo -q name -n "$REAL_USB_DEVICE")"
else
BugError "Unable to determine raw USB device for $REAL_USB_DEVICE"
Expand Down