udev: use a patch from Archlinux to fix some perms, bump revision.
--HG-- extra : convert_revision : ac87852e1adb89dbda9bd549f0337a95f2c3508b
This commit is contained in:
parent
28f31ff7d2
commit
db5b069a23
3 changed files with 67 additions and 1 deletions
51
templates/udev/arch-udev-rules.diff
Normal file
51
templates/udev/arch-udev-rules.diff
Normal file
|
@ -0,0 +1,51 @@
|
|||
--- rules/rules.d/50-udev-default.rules 2009-03-07 22:22:48.200242883 +0100
|
||||
+++ rules/rules.d.arch/50-udev-default.rules 2009-03-07 22:23:26.134434516 +0100
|
||||
@@ -64,20 +64,20 @@
|
||||
|
||||
# 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 0640 -G floppy $root/%k"
|
||||
-KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions"
|
||||
+KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/%k"
|
||||
+KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions", GROUP="floppy"
|
||||
|
||||
# cdrom
|
||||
-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
|
||||
-SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom"
|
||||
-SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
|
||||
-KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
|
||||
-KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom"
|
||||
+SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="optical", MODE="0660"
|
||||
+SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="optical", MODE="0660"
|
||||
+SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical", MODE="0660"
|
||||
+KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="optical", MODE="0660"
|
||||
+KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="optical", MODE="0660"
|
||||
|
||||
# tape
|
||||
-KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
|
||||
-KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape"
|
||||
-SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
|
||||
+KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="storage", MODE="0660"
|
||||
+KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="storage", MODE="0660"
|
||||
+SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage", MODE="0660"
|
||||
|
||||
# block-releated
|
||||
KERNEL=="sch[0-9]*", GROUP="disk"
|
||||
@@ -116,5 +116,4 @@
|
||||
KERNEL=="cpad[0-9]*", NAME="usb/%k"
|
||||
|
||||
# do not delete static device nodes
|
||||
-ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove"
|
||||
-ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove"
|
||||
+ACTION=="remove", PROGRAM="ignore-remove.sh %r", OPTIONS+="ignore_remove"
|
||||
--- rules/rules.d/60-persistent-storage.rules 2009-03-07 22:22:48.200242883 +0100
|
||||
+++ rules/rules.d.arch/60-persistent-storage.rules 2009-03-07 22:22:54.757744454 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
SUBSYSTEM!="block", GOTO="persistent_storage_end"
|
||||
|
||||
# skip rules for inappropriate block devices
|
||||
-KERNEL=="ram*|fd*|nbd*|gnbd*|dm-*|md*|btibm*", GOTO="persistent_storage_end"
|
||||
+KERNEL=="ram*|fd*|nbd*|gnbd*|md*|btibm*", GOTO="persistent_storage_end"
|
||||
|
||||
# never access non-cdrom removable ide devices, the drivers are causing event loops on open()
|
||||
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
|
13
templates/udev/files/ignore-remove.sh
Normal file
13
templates/udev/files/ignore-remove.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for f in ${DEVNAME} ${DEVLINKS}; do
|
||||
if [ -e "/lib/udev/devices/${f#$1}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
|
@ -1,7 +1,8 @@
|
|||
# Template file for 'udev'
|
||||
pkgname=udev
|
||||
version=140
|
||||
revision=1
|
||||
revision=2
|
||||
patch_files="arch-udev-rules.diff"
|
||||
distfiles="
|
||||
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-${version}.tar.bz2"
|
||||
build_style=gnu_configure
|
||||
|
@ -25,6 +26,7 @@ post_install()
|
|||
for f in ia64 ppc s390; do
|
||||
rm ${DESTDIR}/lib/udev/rules.d/40-${f}.rules
|
||||
done
|
||||
install -m755 ${FILESDIR}/ignore-remove.sh ${DESTDIR}/lib/udev
|
||||
|
||||
# Create some devices that are needed by the initramfs.
|
||||
install -d $DESTDIR/lib/firmware
|
||||
|
|
Loading…
Reference in a new issue