diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-04-20 21:15:00 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-04-20 21:15:00 +0200 |
commit | 41677cf51fb2c14aa512ecf9410e43eb35560408 (patch) | |
tree | fa9c69b13f86d06acf592163e3c7b6f0494b08dc /etc | |
parent | 803ac7a6d8d06787305a01a068c2e0ca47e2536d (diff) |
persistent device naming: also read unpartitioned media
Diffstat (limited to 'etc')
-rw-r--r-- | etc/udev/rules.d/60-persistent-storage.rules | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules index a1e0917ab5..85a9270027 100644 --- a/etc/udev/rules.d/60-persistent-storage.rules +++ b/etc/udev/rules.d/60-persistent-storage.rules @@ -3,6 +3,9 @@ # persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} # scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de> +# forward scsi device event to corresponding block device +ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" + ACTION!="add|change", GOTO="persistent_storage_end" SUBSYSTEM!="block", GOTO="persistent_storage_end" @@ -47,8 +50,13 @@ ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p" ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" -# by-label/by-uuid (filesystem properties) -ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode" +# skip unpartitioned removable media devices from drivers which do not send "change" events +ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" + +# import filesystem metadata +IMPORT{program}="vol_id --export $tempnode" + +# by-label/by-uuid links (filesystem metadata) 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}" |