1
0
mirror of https://git.linuxfromscratch.org/lfs.git synced 2025-03-05 13:54:49 +00:00
lfs/udev-lfs/83-cdrom-symlinks.rules
2017-10-27 17:11:05 +00:00

14 lines
551 B
Plaintext

# /etc/udev/rules.d/83-cdrom-symlinks.rules: Determine CD drive capability.
ACTION!="add", GOTO="cd_aliases_generator_end"
SUBSYSTEM!="block", GOTO="cd_aliases_generator_end"
ENV{GENERATED}=="?*", GOTO="cd_aliases_generator_end"
# Fail the uevent if the autogenerated rules cannot be saved
ENV{ID_CDROM}=="?*", PROGRAM="/bin/grep -c ' / [^[:space:]]* rw' /proc/mounts", \
RESULT!="1", RUN+="/bin/false", GOTO="cd_aliases_generator_end"
ENV{ID_CDROM}=="?*", PROGRAM="write_cd_rules", SYMLINK+="%c"
LABEL="cd_aliases_generator_end"