From 12574f2c42069a8d63ebc3ae63b9db084536163a Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sat, 13 Oct 2012 16:14:09 +0000 Subject: Add boot/shutdown script customization instructions git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10016 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- udev-lfs/83-cdrom-symlinks.rules | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 udev-lfs/83-cdrom-symlinks.rules (limited to 'udev-lfs/83-cdrom-symlinks.rules') diff --git a/udev-lfs/83-cdrom-symlinks.rules b/udev-lfs/83-cdrom-symlinks.rules new file mode 100644 index 000000000..5d6b60078 --- /dev/null +++ b/udev-lfs/83-cdrom-symlinks.rules @@ -0,0 +1,13 @@ +# /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_rules", SYMLINK+="%c" + +LABEL="cd_aliases_generator_end" -- cgit v1.2.3-54-g00ecf