mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2025-01-09 08:29:50 +00:00
Fix opening when device identification is^Hwas too slow
This commit is contained in:
parent
fcfa222e4a
commit
d7b4313b08
14
src/tomb
14
src/tomb
@ -104,7 +104,19 @@ ask_usbkey() {
|
||||
echo -n " . usb attached, opening "
|
||||
|
||||
# get the first partition
|
||||
usbpart=`dmesg |tail -n 12 | grep ' sd.:' |cut -d: -f2 |tr -d ' '`
|
||||
# usbpart=`dmesg |tail -n 12 | grep ' sd.:' |cut -d: -f2 |tr -d ' '`
|
||||
for i in $(seq 1 10); do
|
||||
usbpart=$(dmesg | tail -n 12 | sed '/ sd.:/!d;s/^.*: \(sd.[0-9]*\)/\1/')
|
||||
if [ -n "$usbpart" ]; then
|
||||
break
|
||||
elif [ $i -eq 10 ]; then
|
||||
error "timeout."
|
||||
return 1
|
||||
else
|
||||
echo -n .
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
||||
# # wait that is mounted (it automount is on)
|
||||
# c=0
|
||||
|
Loading…
Reference in New Issue
Block a user