mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
udevil: mount optical disks too
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
21fb919659
commit
3fbf2f82ef
@ -1,11 +1,21 @@
|
|||||||
# Mount blockdevices, /dev/sd* and partitions only
|
# check for blockdevices, /dev/sd* and /dev/sr*
|
||||||
SUBSYSTEM!="block", KERNEL!="sd*", ENV{DEVTYPE}!="partition", GOTO="exit"
|
SUBSYSTEM!="block", KERNEL!="sd*|sr*",GOTO="exit"
|
||||||
|
|
||||||
# Mount the device
|
# /dev/sd* with partitions only and /dev/sr* disks only
|
||||||
|
KERNEL=="sd*", ENV{DEVTYPE}=="partition", GOTO="harddisk"
|
||||||
|
KERNEL=="sr*", ENV{DEVTYPE}=="disk", GOTO="optical"
|
||||||
|
GOTO="exit"
|
||||||
|
|
||||||
|
# mount or umount for hdds
|
||||||
|
LABEL="harddisk"
|
||||||
ACTION=="add", RUN+="/usr/bin/udevil --mount /dev/%k"
|
ACTION=="add", RUN+="/usr/bin/udevil --mount /dev/%k"
|
||||||
|
|
||||||
# Clean up after removal
|
|
||||||
ACTION=="remove", RUN+="/usr/bin/udevil --umount /dev/%k"
|
ACTION=="remove", RUN+="/usr/bin/udevil --umount /dev/%k"
|
||||||
|
GOTO="exit"
|
||||||
|
|
||||||
|
# mount or umount for opticals
|
||||||
|
LABEL="optical"
|
||||||
|
ACTION=="add|change", RUN+="/usr/bin/udevil --umount /dev/%k", RUN+="/usr/bin/udevil --mount /dev/%k"
|
||||||
|
GOTO="exit"
|
||||||
|
|
||||||
# Exit
|
# Exit
|
||||||
LABEL="exit"
|
LABEL="exit"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user