modprobe -r scsi_debug &>/dev/null \
|| ts_skip "cannot remove scsi_debug module (rmmod)"
- modprobe -b scsi_debug $* &>/dev/null \
+ modprobe -b scsi_debug "$@" &>/dev/null \
|| ts_skip "cannot load scsi_debug module (modprobe)"
# it might be still not loaded, modprobe.conf or whatever
lsmod | grep -q "^scsi_debug " \
|| ts_skip "scsi_debug module not loaded (lsmod)"
- devname=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}')
- [ "x${devname}" == "x" ] && ts_die "cannot find scsi_debug device"
-
sleep 1
udevadm settle
+ devname=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}')
+ [ "x${devname}" == "x" ] && ts_die "cannot find scsi_debug device"
+
TS_DEVICE="/dev/${devname}"
}