Ignoring fixed partitions which are not mounted in /media

Doug Goldstein cardoe at gentoo.org
Wed Apr 18 13:30:36 PDT 2007


Danny Kukawka wrote:
> On Mittwoch, 18. April 2007, Martin Pitt wrote:
>   
>> Hi all,
>>
>> in Ubuntu we want to ignore volumes which come from non-removable
>> devices and are mounted to a place different than /media, since they
>> (1) only appear as clutter to users (such as /boot, /home, or /usr)
>> and (2) it's usually a bad idea to unmount them with gnome-mount.
>>
>> For this we apply a rule to 20-storage-methods.fdi (in the
>> volume.fsusage == "filesystem" block where the other special cases
>> like Apple Bootstrap are handled):
>>     
> [..]
>   
>> This problem does not seem to be special to Ubuntu to me. How do other
>> distros solve this, perhaps more elegantly? If this is a common need,
>> can we find a common solution which can be integrated upstream?
>>     
>
> On SUSE we use the attached patch since ages.
>
> Danny
>
>
>
>   
> ------------------------------------------------------------------------
>
> --- fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi	1970-01-01 01:00:00.000000000 +0100
> +++ fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi	2006-03-07 00:02:06.000000000 +0100
> @@ -0,0 +1,11 @@
> +<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 
> +
> +<deviceinfo version="0.2">
> +<device>
> +  <match key="@block.storage_device:storage.hotpluggable" bool="false">
> +    <match key="@block.storage_device:storage.removable" bool="false">
> +      <merge key="volume.ignore" type="bool">true</merge>
> +    </match>
> +  </match>
> +</device>
> +</deviceinfo>
> --- fdi/policy/10osvendor/Makefile.am	2006-03-30 18:54:42.000000000 +0200
> +++ fdi/policy/10osvendor/Makefile.am	2006-03-30 18:55:09.000000000 +0200
> @@ -6,7 +6,8 @@
>  	10-power-mgmt-policy.fdi	\
>  	10-laptop-panel-mgmt-policy.fdi	\
>  	15-storage-luks.fdi		\
> -	20-storage-methods.fdi
> +	20-storage-methods.fdi		\
> +	99-storage-policy-fixed-drives.fdi
>  
>  if HAVE_SELINUX
>  dist_fdi_DATA += 20-storage-add-selinux.fdi
>   
>
>   
Any reason you don't wrap that whole thing with:

<match key="volume.fsusage" string="filesystem">

Seems kind of nasty to try to match that to every single device...


More information about the hal mailing list