From 78171d9549fafdfc1e29d30915104a3ad55e116b Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 15 Dec 2009 15:07:25 +0100 Subject: [PATCH] floppy: fix rule to create additional floppy device nodes --- Makefile.am | 1 + extras/floppy/60-floppy.rules | 4 ++++ rules/rules.d/50-udev-default.rules | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 extras/floppy/60-floppy.rules diff --git a/Makefile.am b/Makefile.am index 4435398e..62fe5a0f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -235,6 +235,7 @@ dist_udevrules_DATA += extras/edd_id/61-persistent-storage-edd.rules extras_floppy_create_floppy_devices_SOURCES = extras/floppy/create_floppy_devices.c extras_floppy_create_floppy_devices_LDADD = libudev/libudev-private.la libexec_PROGRAMS += extras/floppy/create_floppy_devices +dist_udevrules_DATA += extras/floppy/60-floppy.rules # ------------------------------------------------------------------------------ # input_id - import input device class diff --git a/extras/floppy/60-floppy.rules b/extras/floppy/60-floppy.rules new file mode 100644 index 00000000..3123bb55 --- /dev/null +++ b/extras/floppy/60-floppy.rules @@ -0,0 +1,4 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM=="block", KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", ENV{CMOS_TYPE}="$attr{cmos}", \ + RUN+="create_floppy_devices -c -t $env{CMOS_TYPE} -m %M -M 0640 -G floppy $root/%k" diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules index 00c73dfe..f01fc037 100644 --- a/rules/rules.d/50-udev-default.rules +++ b/rules/rules.d/50-udev-default.rules @@ -74,7 +74,6 @@ SUBSYSTEM=="block", GROUP="disk" # floppy KERNEL=="fd[0-9]", GROUP="floppy" -KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/%k" # cdrom SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom" -- 2.39.5