update Gentoo rules

This commit is contained in:
Matthias Schwarzott
2007-03-28 20:31:19 +02:00
committed by Kay Sievers
parent 4e2b290821
commit 1532b47bdf
5 changed files with 54 additions and 35 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ SUBSYSTEM=="module", OPTIONS="ignore_device"
# sysfs is populated after the event is sent
ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
ACTION=="add", SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+31
View File
@@ -0,0 +1,31 @@
# device mapper links hook into "change" events, when the dm table
# becomes available; some table-types must be ignored
KERNEL=="device-mapper", NAME="mapper/control"
KERNEL=="dm-*", ACTION=="add|change", GOTO="device_mapper_do"
GOTO="device_mapper_end"
LABEL="device_mapper_do"
# lookup device name
# use dmsetup, until devmap_name is provided by sys-fs/device-mapper
PROGRAM=="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info",
ENV{ID_DM_NAME}="%c"
# do not do anything if dmsetup does not provide a name
ENV{ID_DM_NAME}=="", NAME="", OPTIONS="ignore_device"
# ignore luks crypt devices while not fully up
ENV{ID_DM_NAME}=="temporary-cryptsetup-*", NAME="", OPTIONS="ignore_device"
# use queried name
ENV{ID_DM_NAME}=="?*", NAME="mapper/$env{ID_DM_NAME}"
PROGRAM!="/sbin/dmsetup status -j %M -m %m", GOTO="device_mapper_end"
RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end"
IMPORT{program}="vol_id --export $tempnode"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}", OPTIONS="link_priority=50"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}", OPTIONS="link_priority=50"
LABEL="device_mapper_end"
-15
View File
@@ -1,15 +0,0 @@
# /etc/udev/rules/95-net.rules: device naming rules for udev
#
# Gentoo specific rules
#
# There are a number of modifiers that are allowed to be used in some of the
# fields. See the udev man page for a full description of them.
#
# Try not to modify this file, if you wish to change things, create a new rule
# file that can be run before this one.
#
# Activate our network if we can
SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start", OPTIONS="last_rule"
SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop", OPTIONS="last_rule"
+21
View File
@@ -0,0 +1,21 @@
# /etc/udev/rules/95-udev-late.rules: device naming rules for udev
#
# Gentoo specific rules
#
# There are a number of modifiers that are allowed to be used in some of the
# fields. See the udev man page for a full description of them.
#
# Try not to modify this file, if you wish to change things, create a new rule
# file that can be run before this one.
#
# Activate our network if we can
SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start"
SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop"
# debug events to /events, but not on default udev_log="err"
ENV{UDEV_LOG}=="[4-9]", RUN+="eventrecorder.sh"
# event to be catched by udevmonitor
RUN+="socket:/org/kernel/udev/monitor"
+1 -19
View File
@@ -78,14 +78,6 @@ KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL=="microcode", NAME="cpu/microcode"
# dm devices
# lookup device name and create device in /dev/mapper
# use dmsetup, until devmap_name is provided by sys-fs/device-mapper
ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="dm-*", \
PROGRAM="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info", \
NAME="mapper/%c"
KERNEL=="device-mapper", NAME="mapper/control"
# fb devices
KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video"
@@ -101,7 +93,7 @@ KERNEL=="i2c-[0-9]*", NAME="i2c/%n", SYMLINK+="%k"
KERNEL=="mice", NAME="input/%k", MODE="0644"
KERNEL=="mouse*", NAME="input/%k", MODE="0644"
KERNEL=="event*", NAME="input/%k", MODE="0600"
KERNEL=="js*", NAME="input/%k", MODE="664"
KERNEL=="js*", NAME="input/%k", MODE="0664"
KERNEL=="ts*", NAME="input/%k", MODE="0600"
# loop devices
@@ -308,13 +300,3 @@ SUBSYSTEM=="firmware", RUN+="firmware.sh"
LABEL="hotplug_no_add_event"
LABEL="gentoo_device_rules_end"
# be backward compatible for a while with the /etc/dev.d and /etc/hotplug.d/ systems
# run /etc/hotplug.d/ stuff only if we came from a hotplug event, not for udevstart
#ENV{UDEVD_EVENT}=="1", RUN+="udev_run_hotplugd $env{SUBSYSTEM}"
# always run /etc/dev.d/ stuff for now.
RUN+="udev_run_devd $env{SUBSYSTEM}"
# debugging monitor
RUN+="socket:/org/kernel/udev/monitor"