[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH] Fix udev rule



From: David Zeuthen <davidz redhat com>

The udev rules for detecting OS'es are too complicated and they also don't
work when detecting OS'es on e.g. a loop device. For example, the stuff
about DISK_MEDIA_CHANGE is kinda wrong.

The latter is pretty annoying as the default action in F18 for an .ISO file
is to loopback mount it - as a result the user is presented with "Open with
Files" instead of "Open with Boxes".

Fixes rhbz#863468
---
 data/95-osinfo.rules.in | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/data/95-osinfo.rules.in b/data/95-osinfo.rules.in
index 0ea4d00..dc89757 100644
--- a/data/95-osinfo.rules.in
+++ b/data/95-osinfo.rules.in
@@ -1,25 +1,3 @@
-# USB flash drives
-ACTION=="add|remove", \
- SUBSYSTEM=="block", \
- ENV{ID_FS_TYPE}=="iso9660", \
- ENV{DISK_MEDIA_CHANGE}==1, \
- IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
+SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="iso9660|udf", \
+    IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
 
-ACTION=="add|remove", \
- SUBSYSTEM=="block", \
- ENV{ID_FS_TYPE}=="udf", \
- ENV{DISK_MEDIA_CHANGE}==1, \
- IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
-
-# CDROMs
-
-# Disk inserted
-ACTION=="change", \
- SUBSYSTEM=="block", \
- ENV{ID_FS_TYPE}=="iso9660", \
- IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
-
-ACTION=="change", \
- SUBSYSTEM=="block", \
- ENV{ID_FS_TYPE}=="udf", \
- IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
-- 
1.7.12.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]