mirror of
https://github.com/linuxboot/heads.git
synced 2025-04-12 05:40:09 +00:00
mount-usb: Fix word splitting in test for USB devices
For partitioned media or when more than one device is present, this fixes a benign script error that ash had apparently ignored. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
parent
e32fc91baf
commit
f1708bf3a7
@ -23,7 +23,7 @@ if [ ! -d /media ]; then
|
||||
fi
|
||||
|
||||
list_usb_storage > /tmp/usb_block_devices
|
||||
if [ -z `cat /tmp/usb_block_devices` ]; then
|
||||
if [ -z "$(cat /tmp/usb_block_devices)" ]; then
|
||||
if [ -x /bin/whiptail ]; then
|
||||
whiptail $BG_COLOR --title 'USB Drive Missing' \
|
||||
--msgbox "Insert your USB drive and press Enter to continue." 16 60
|
||||
@ -33,7 +33,7 @@ if [ -z `cat /tmp/usb_block_devices` ]; then
|
||||
fi
|
||||
sleep 1
|
||||
list_usb_storage > /tmp/usb_block_devices
|
||||
if [ -z `cat /tmp/usb_block_devices` ]; then
|
||||
if [ -z "$(cat /tmp/usb_block_devices)" ]; then
|
||||
if [ -x /bin/whiptail ]; then
|
||||
whiptail $BG_COLOR_ERROR --title 'ERROR: USB Drive Missing' \
|
||||
--msgbox "USB Drive Missing! Aborting mount attempt.\n\nPress Enter to continue." 16 60
|
||||
|
Loading…
x
Reference in New Issue
Block a user