Skip to content

Commit

Permalink
Correct test and escape earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
schabrolles committed Dec 5, 2017
1 parent 61c50d0 commit b0bb510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/share/rear/layout/prepare/default/250_compare_disks.sh
Expand Up @@ -75,12 +75,12 @@ if ! is_true "$MIGRATION_MODE" ; then
local current_disk_name=''
local current_size=''
for current_device_path in /sys/block/* ; do
# Continue with next block device if the device is a multipath device slave
is_multipath_path ${current_device_path#/sys/block/} || continue
# Continue with next block device if the current one has no queue directory:
test -d $current_device_path/queue || continue
# Continue with next block device if no size can be read for the current one:
test -r $current_device_path/size || continue
# Continue with next block device if the device is a multipath device slave
test is_multipath_path /dev/$current_device_path || continue
current_disk_name="${current_device_path#/sys/block/}"
current_size=$( get_disk_size $current_disk_name )
test "$current_size" -gt '0' && replacement_hardware_disk_sizes=( "${replacement_hardware_disk_sizes[@]}" "$current_size" )
Expand Down

0 comments on commit b0bb510

Please sign in to comment.