Open JosiahKerley opened 2 months ago
Fixes device enumeration where a trailing dash is undermining the cut/rev.
For example, on my host, lsscsi -g -k | grep -w "cd/dvd" | tr -s ' ' is producing the output:
lsscsi -g -k | grep -w "cd/dvd" | tr -s ' '
[1:0:0:0] cd/dvd HL-DT-ST BD-RE WH14NS40 1.05 /dev/sr0 -
When rev | cut -d' ' -f2 | rev is used, it's locking onto the dash, not the device path.
rev | cut -d' ' -f2 | rev
This patch explicitly uses the device path.
Fixes device enumeration where a trailing dash is undermining the cut/rev.
For example, on my host,
lsscsi -g -k | grep -w "cd/dvd" | tr -s ' '
is producing the output:When
rev | cut -d' ' -f2 | rev
is used, it's locking onto the dash, not the device path.This patch explicitly uses the device path.