braindamaged avatar braindamaged committed 35f784e

rules: move all unconditionally installed rules to rules/

Comments (0)

Files changed (7)

 	rules/60-persistent-net.rules \
 	rules/60-persistent-alsa.rules \
 	rules/60-persistent-storage.rules \
+	rules/60-persistent-v4l.rules \
+	rules/60-cdrom_id.rules \
+	rules/61-accelerometer.rules \
 	rules/64-btrfs.rules \
 	rules/75-net-description.rules \
 	rules/75-tty-description.rules \
 cdrom_id_SOURCES = src/cdrom_id/cdrom_id.c
 cdrom_id_LDADD = libudev-private.la
 pkglibexec_PROGRAMS += cdrom_id
-dist_udevrules_DATA += src/cdrom_id/60-cdrom_id.rules
 
 # ------------------------------------------------------------------------------
 collect_SOURCES = src/collect/collect.c
 v4l_id_SOURCES = src/v4l_id/v4l_id.c
 v4l_id_LDADD = libudev-private.la
 pkglibexec_PROGRAMS += v4l_id
-dist_udevrules_DATA += src/v4l_id/60-persistent-v4l.rules
 
 # ------------------------------------------------------------------------------
 accelerometer_SOURCES = src/accelerometer/accelerometer.c
 accelerometer_LDADD = libudev-private.la -lm
 pkglibexec_PROGRAMS += accelerometer
-dist_udevrules_DATA += src/accelerometer/61-accelerometer.rules
 
 # ------------------------------------------------------------------------------
 if ENABLE_GUDEV

rules/60-cdrom_id.rules

+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="cdrom_end"
+SUBSYSTEM!="block", GOTO="cdrom_end"
+KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
+ENV{DEVTYPE}!="disk", GOTO="cdrom_end"
+
+# unconditionally tag device as CDROM
+KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1"
+
+# media eject button pressed
+ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
+
+# import device and media properties and lock tray to
+# enable the receiving of media eject button events
+IMPORT{program}="cdrom_id --lock-media $devnode"
+
+KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
+
+LABEL="cdrom_end"

rules/60-persistent-v4l.rules

+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="persistent_v4l_end"
+SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end"
+ENV{MAJOR}=="", GOTO="persistent_v4l_end"
+
+IMPORT{program}="v4l_id $devnode"
+
+SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
+KERNEL=="video*", ENV{ID_SERIAL}=="?*", SYMLINK+="v4l/by-id/$env{ID_BUS}-$env{ID_SERIAL}-video-index$attr{index}"
+
+# check for valid "index" number
+TEST!="index", GOTO="persistent_v4l_end"
+ATTR{index}!="?*", GOTO="persistent_v4l_end"
+
+IMPORT{builtin}="path_id"
+ENV{ID_PATH}=="?*", KERNEL=="video*|vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}"
+ENV{ID_PATH}=="?*", KERNEL=="audio*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}"
+
+LABEL="persistent_v4l_end"

rules/61-accelerometer.rules

+# do not edit this file, it will be overwritten on update
+
+SUBSYSTEM=="input", ACTION!="remove", ENV{ID_INPUT_ACCELEROMETER}=="1", IMPORT{program}="accelerometer %p"

src/accelerometer/61-accelerometer.rules

-# do not edit this file, it will be overwritten on update
-
-SUBSYSTEM=="input", ACTION!="remove", ENV{ID_INPUT_ACCELEROMETER}=="1", IMPORT{program}="accelerometer %p"

src/cdrom_id/60-cdrom_id.rules

-# do not edit this file, it will be overwritten on update
-
-ACTION=="remove", GOTO="cdrom_end"
-SUBSYSTEM!="block", GOTO="cdrom_end"
-KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
-ENV{DEVTYPE}!="disk", GOTO="cdrom_end"
-
-# unconditionally tag device as CDROM
-KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1"
-
-# media eject button pressed
-ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
-
-# import device and media properties and lock tray to
-# enable the receiving of media eject button events
-IMPORT{program}="cdrom_id --lock-media $devnode"
-
-KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100"
-
-LABEL="cdrom_end"

src/v4l_id/60-persistent-v4l.rules

-# do not edit this file, it will be overwritten on update
-
-ACTION=="remove", GOTO="persistent_v4l_end"
-SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end"
-ENV{MAJOR}=="", GOTO="persistent_v4l_end"
-
-IMPORT{program}="v4l_id $devnode"
-
-SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
-KERNEL=="video*", ENV{ID_SERIAL}=="?*", SYMLINK+="v4l/by-id/$env{ID_BUS}-$env{ID_SERIAL}-video-index$attr{index}"
-
-# check for valid "index" number
-TEST!="index", GOTO="persistent_v4l_end"
-ATTR{index}!="?*", GOTO="persistent_v4l_end"
-
-IMPORT{builtin}="path_id"
-ENV{ID_PATH}=="?*", KERNEL=="video*|vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}"
-ENV{ID_PATH}=="?*", KERNEL=="audio*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}"
-
-LABEL="persistent_v4l_end"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.