[virt-tools-list] [osinfo PATCH] Rework udev rule some more

Christophe Fergeau cfergeau at redhat.com
Fri Feb 10 09:14:28 UTC 2012


Ping?

On Fri, Jan 27, 2012 at 06:04:40PM +0100, Christophe Fergeau wrote:
> Now that the rules to remove device properties when the CD is ejected
> have been fixed, another bug in these rules shows up: there are 2 rules
> very similar to the rules for disk insertion. One of them matches
> ID_FS_TYPE != "iso9660" and the other matches ID_FS_TYPE != "udf" which
> means that at least one of them will trigger and will remove the
> OSINFO_* properties that have been just set by the insertion rules.
> 
> While attempting to fix them, I've noticed that these properties go
> away anyway when the disk is removed (??), so we can get rid of them.
> While at it, I've added a test to check that the 'change' events correspond
> to a media change.
> ---
>  data/95-osinfo.rules.in |   20 ++------------------
>  1 files changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/data/95-osinfo.rules.in b/data/95-osinfo.rules.in
> index 33e5986..ec42b74 100644
> --- a/data/95-osinfo.rules.in
> +++ b/data/95-osinfo.rules.in
> @@ -15,27 +15,11 @@ ACTION=="add|remove", \
>  ACTION=="change", \
>   SUBSYSTEM=="block", \
>   ENV{ID_FS_TYPE}=="iso9660", \
> + ENV{DISK_MEDIA_CHANGE}==1, \
>   IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
>  
>  ACTION=="change", \
>   SUBSYSTEM=="block", \
>   ENV{ID_FS_TYPE}=="udf", \
> + ENV{DISK_MEDIA_CHANGE}==1, \
>   IMPORT{program}="@bindir@/osinfo-detect -f env $tempnode"
> -
> -# Disk ejected
> -ACTION=="change", \
> - SUBSYSTEM=="block", \
> - ENV{ID_FS_TYPE}!="iso9660", \
> - ENV{OSINFO_BOOTABLE}="", \
> - ENV{OSINFO_INSTALLER}="", \
> - ENV{OSINFO_LIVE}="", \
> - ENV{OSINFO_MEDIA}=""
> -
> -ACTION=="change", \
> - SUBSYSTEM=="block", \
> - ENV{ID_FS_TYPE}!="udf", \
> - ENV{OSINFO_BOOTABLE}="", \
> - ENV{OSINFO_INSTALLER}="", \
> - ENV{OSINFO_LIVE}="", \
> - ENV{OSINFO_MEDIA}=""
> -
> -- 
> 1.7.7.6
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20120210/038444a5/attachment.sig>


More information about the virt-tools-list mailing list