jlesage / docker-makemkv

Docker container for MakeMKV
MIT License
455 stars 52 forks source link

Handling trailing dashes in 54-check-optical-drive.sh #219

Open JosiahKerley opened 2 months ago

JosiahKerley commented 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:

[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.

This patch explicitly uses the device path.