hdparm: stop trying set speed on invalid optical devices

This commit is contained in:
MilhouseVH 2017-07-16 21:52:22 +01:00
parent fffd87426c
commit 84c946dec4

View File

@ -19,6 +19,9 @@
# only do anything on block devices which are not removed
ACTION!="add|change", GOTO="cdrom_end"
# /dev/sr, /dev/sr_mod, /dev/srcutree are not valid
KERNEL=="sr|sr_mod|srcutree", GOTO="cdrom_end"
# set CDROM speed
KERNEL=="sr*", RUN+="/sbin/hdparm -E8 /dev/%k"