lfs/udev-lfs/contrib/debian/83-cdrom-symlinks.rules
Bruce Dubbs b2b1e1aa5f Move directory to make build easier
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9973 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2012-09-01 02:31:13 +00:00

13 lines
549 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!="2", RUN+="/bin/false", GOTO="cd_aliases_generator_end"
ENV{ID_CDROM}=="?*", PROGRAM="write_cd_aliases", SYMLINK+="%c"
LABEL="cd_aliases_generator_end"