diff --git a/src/rules/90-dvd-storage.rules b/src/rules/90-dvd-storage.rules new file mode 100644 index 0000000..603bafc --- /dev/null +++ b/src/rules/90-dvd-storage.rules @@ -0,0 +1,5 @@ +# Rule for DVD disk insertion +#ACTION=="change", SUBSYSTEM=="block", KERNEL=="sr[0-9]*", ENV{ID_CDROM_MEDIA}=="1", RUN+="/usr/bin/sudo /usr/local/bin/dvd-storage-action add %E{DEVNAME}" +# Rule for DVD disk removal +#ACTION=="change", SUBSYSTEM=="block", KERNEL=="sr[0-9]*", ENV{ID_CDROM_MEDIA}!="1", RUN+="/usr/bin/sudo /usr/local/bin/dvd-storage-action remove %E{DEVNAME}" +ACTION=="change", SUBSYSTEM=="block", KERNEL=="sr[0-9]*", ENV{ID_CDROM}=="1", RUN+="/usr/bin/sudo /usr/local/bin/dvd-storage-action %E{ACTION} %E{DEVNAME}"