Browse Source
Wait for USB devices to be ready after rebinding drivers (#724)
show-build-version
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
14 additions and
0 deletions
-
scripts/umbrel-os/external-storage/mount
|
|
@ -184,6 +184,20 @@ main () { |
|
|
|
echo "Blacklisting USB device IDs against UAS driver..." |
|
|
|
blacklist_uas |
|
|
|
|
|
|
|
echo "Checking USB devices are back..." |
|
|
|
retry_for_usb_devices=1 |
|
|
|
while [[ ! -e "${partition_path}" ]]; do |
|
|
|
retry_for_usb_devices=$(( $retry_for_usb_devices + 1 )) |
|
|
|
if [[ $retry_for_usb_devices -gt 10 ]]; then |
|
|
|
echo "USB devices weren't registered after 10 tries..." |
|
|
|
echo "Exiting mount script without doing anything" |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
|
|
|
|
echo "Waiting for USB devices..." |
|
|
|
sleep 1 |
|
|
|
done |
|
|
|
|
|
|
|
echo "Checking if the device is ext4..." |
|
|
|
|
|
|
|
if is_partition_ext4 "${partition_path}" ; then |
|
|
|