summaryrefslogtreecommitdiff
blob: fca477116cf188488ad71d39caeff6075d99dfb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules
index 57f2387..b2f69e2 100644
--- a/etc/udev/gentoo/50-udev.rules
+++ b/etc/udev/gentoo/50-udev.rules
@@ -129,7 +129,8 @@ KERNEL=="dnrtmsg",	NAME="netlink/%k"
 KERNEL=="tap*",		NAME="netlink/%k"
 
 # network devices
-KERNEL=="tun",		NAME="net/%k",	MODE="0600"
+KERNEL=="tun",		NAME="net/%k",	MODE="0660", OPTIONS+="ignore_remove"
+KERNEL=="ppp",		MODE="0600", OPTIONS+="ignore_remove"
 
 # ramdisk devices
 KERNEL=="ram[0-9]*",	NAME="rd/%n", SYMLINK+="%k"
@@ -240,15 +241,18 @@ KERNEL=="issm*",	NAME="infiniband/%k"
 
 
 # usbfs-like device nodes
+# the way to go up to kernel 2.6.21 (and above if setting USB_DEVICE_CLASS=y)
 SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664"
+# starting from kernel 2.6.22 use this rule
+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
+	NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="usb", MODE="0664" 
 
-
-# Setting timeout for tape-devices to 900 seconds
+# Setting timeout for tape-devices (type 1) to 900 seconds
+# and 60 seconds for device types 0, 7 and 14
 # if you need timeouts for other devices add a similar rule
 # with correct type-value, or open a bug on bugs.gentoo.org.
-ACTION=="add", SUBSYSTEM=="scsi" , ATTRS{type}=="1", \
-	RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'"
-
+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="0|7|14", ATTR{timeout}="60"
+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="1", ATTR{timeout}="900"
 
 # Module autoloading
 ACTION!="add", GOTO="hotplug_no_add_event"