From f1708bf3a7812e6857b72118f39f1a8de864fd12 Mon Sep 17 00:00:00 2001 From: Jonathon Hall Date: Sat, 25 Mar 2023 17:06:12 -0400 Subject: [PATCH] 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 --- initrd/bin/mount-usb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/initrd/bin/mount-usb b/initrd/bin/mount-usb index 29bc5f74..70b1c097 100755 --- a/initrd/bin/mount-usb +++ b/initrd/bin/mount-usb @@ -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