From 900878ac803eb298c7adfe2b35a8b4ee9708ef6e Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sat, 28 Apr 2007 13:29:24 +0200 Subject: [PATCH] rules: Fedora update --- etc/udev/redhat/05-udev-early.rules | 13 ++++++++++--- etc/udev/redhat/50-udev.rules | 9 +++------ etc/udev/redhat/95-pam-console.rules | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/etc/udev/redhat/05-udev-early.rules b/etc/udev/redhat/05-udev-early.rules index 970feb85..c3024569 100644 --- a/etc/udev/redhat/05-udev-early.rules +++ b/etc/udev/redhat/05-udev-early.rules @@ -1,10 +1,17 @@ # 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" diff --git a/etc/udev/redhat/50-udev.rules b/etc/udev/redhat/50-udev.rules index c6ab1b55..9e946dae 100644 --- a/etc/udev/redhat/50-udev.rules +++ b/etc/udev/redhat/50-udev.rules @@ -65,9 +65,6 @@ KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k" 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 @@ -230,6 +227,7 @@ KERNEL=="zap[0-9]*", NAME="zap/%n" KERNEL=="pktcdvd", NAME="%k/control" + KERNEL=="hd*[!0-9]", ATTR{removable}=="1", \ ATTR{media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" @@ -252,6 +250,7 @@ KERNEL=="hd*[0-9]", BUS=="ide", ATTRS{removable}=="1", \ OPTIONS+="ignore_remove" + ####################################### # Persistent block device stuff - begin ####################################### @@ -311,9 +310,6 @@ ACTION=="add", SUBSYSTEM=="usb_device", \ 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 @@ -347,5 +343,6 @@ ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS # mmc block devices ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block" + RUN+="socket:/org/kernel/udev/monitor" diff --git a/etc/udev/redhat/95-pam-console.rules b/etc/udev/redhat/95-pam-console.rules index ff54b3cb..cbb2d4aa 100644 --- a/etc/udev/redhat/95-pam-console.rules +++ b/etc/udev/redhat/95-pam-console.rules @@ -1 +1 @@ -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}" -- 2.39.5