Hide a disk?

Dan Nicholson dbn.lists at gmail.com
Fri Nov 16 07:44:08 PST 2007


On Nov 16, 2007 7:17 AM, Kay Sievers <kay.sievers at vrfy.org> wrote:
> On Nov 16, 2007 1:31 PM, Tom Horsley <tom.horsley at att.net> wrote:
> > I've got a USB disk I leave plugged in because I want my cron backup script
> > to be able to mount it, do backups, and unmount it.
> >
> > However, I don't want it mounted constantly in gnome sessions and wot-not.
> >
> > How can I hide a specific disk from hal so it won't go blabbing to
> > everyone else on the system about this wonderful disk they should
> > mount?
>
>  Put it in /etc/fstab? So it will be ignored as a system volume.

The alternative is to put some policy in /etc/hal/fdi/policy to set
volume.ignore to true. This rule (installed on most distros) is for
ignoring fixed drives, but you can probably find proper match keys by
looking at your lshal output.

$ cat /etc/hal/fdi/policy/no-fixed-drives.fdi
<?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>

--
Dan


More information about the hal mailing list