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
|
diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules
index 57f2387..202d064 100644
--- a/etc/udev/gentoo/50-udev.rules
+++ b/etc/udev/gentoo/50-udev.rules
@@ -243,12 +243,12 @@ KERNEL=="issm*", NAME="infiniband/%k"
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"
-# 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"
diff --git a/etc/udev/gentoo/64-device-mapper.rules b/etc/udev/gentoo/64-device-mapper.rules
index e104a17..ace522b 100644
--- a/etc/udev/gentoo/64-device-mapper.rules
+++ b/etc/udev/gentoo/64-device-mapper.rules
@@ -27,7 +27,7 @@ RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end"
IMPORT{program}="vol_id --export $tempnode"
OPTIONS="link_priority=50"
-ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_SAFE}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_SAFE}"
-ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
LABEL="device_mapper_end"
|