Ignoring fixed partitions which are not mounted in /media

Martin Pitt martin at piware.de
Wed Apr 18 00:23:41 PDT 2007


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):

|     <!-- Ignore fixed partitions which are not mounted in /media -->
|     <match key="@block.storage_device:storage.hotpluggable" bool="false">
|       <match key="@block.storage_device:storage.removable" bool="false">
|         <match key="volume.is_mounted" bool="true">
|           <merge key="volume.ignore" type="bool">true</merge>
|           <!-- Show /media/ drives -->
|           <match key="volume.mount_point" compare_gt="/media">
|             <match key="volume.mount_point" compare_lt="/media0">
|               <merge key="volume.ignore" type="bool">false</merge>
|             </match>
|           </match>
|         </match>
|       </match>
|     </match>

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?

Thanks in advance,

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/hal/attachments/20070418/77fd8bee/attachment.pgp


More information about the hal mailing list