* do not print grep(1) info message
* use ts_skip rather than ts_die when scsi_debug is useless
Fixes: https://github.com/karelzak/util-linux/issues/1376
Signed-off-by: Karel Zak <kzak@redhat.com>
# wait for device if udevadm settle does not work
for t in 0 0.02 0.05 0.1 1; do
sleep $t
- devname=$(grep --with-filename scsi_debug /sys/block/*/device/model) && break
+ devname=$(grep --no-messages --with-filename scsi_debug /sys/block/*/device/model) && break
done
- [ -n "${devname}" ] || ts_die "timeout waiting for scsi_debug device"
+ [ -n "${devname}" ] || ts_skip "timeout waiting for scsi_debug device"
devname=$(echo $devname | awk -F '/' '{print $4}')
TS_DEVICE="/dev/${devname}"