# sysfs is populated after the event is sent
ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
-ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
-ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
-
# ignore these events until someone needs them
SUBSYSTEM=="drivers", OPTIONS="ignore_device"
SUBSYSTEM=="module", OPTIONS="ignore_device"
+
+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", OPTIONS="last_rule"
+
+# pnp devices
+ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'", OPTIONS="last_rule"
+
+ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+
+ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
+
ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule"
KERNEL=="nvram", MODE="0660"
KERNEL=="rtc", MODE="0644"
-# pnp devices
-ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'"
-
# floppy devices
KERNEL=="fd[01]*", GROUP="floppy", MODE="0660"
# fix floppy devices
KERNEL=="pktcdvd", NAME="%k/control"
+
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", \
ATTR{media}=="floppy", \
SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions"
OPTIONS+="ignore_remove"
+
#######################################
# Persistent block device stuff - begin
#######################################
PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
NAME="%c", MODE="0644"
-ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}"
-
-ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'"
# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
# sr: 4 TYPE_WORM, 5 TYPE_ROM
# mmc block devices
ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block"
+
RUN+="socket:/org/kernel/udev/monitor"
-ACTION=="add", SYSFS{dev}=="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}"
+ENV{STARTUP}!="1", ACTION=="add", SYSFS{dev}=="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}"