recovery init: fix device name
"i" variable in the nested loop is expanded to the absolute path
of the device, so prepending it with the ${device} results in
"/dev/sda/dev/sda1" for a 'sda1' partition.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
2771549da3
commit
b0e241d3a3
|
|
@ -158,7 +158,7 @@ mount_external_disks() {
|
|||
local devices=$(ls -1 /dev/sd? 2>/dev/null)
|
||||
for device in ${devices}; do
|
||||
for i in ${device}?; do
|
||||
local dev_name=$(basename "${device}${i}")
|
||||
local dev_name=$(basename "${i}")
|
||||
local mount_dir="${USB_MOUNT_DIR}${dev_name}"
|
||||
mkdir -p "${mount_dir}"
|
||||
mount "/dev/${dev_name}" "${mount_dir}" 2>/dev/null
|
||||
|
|
|
|||
Loading…
Reference in New Issue