Appending options for partitioned disks

Stephen Frank sf1183 at messiah.edu
Mon May 9 21:27:59 PDT 2005


As I was trying to get my usb thumbdrive to automount and unmount correctly
under HAL and Ivman, I discovered that the default options that HAL uses to
mount devices do not allow for non-root users to unmount them. In other
words, you can't use the Linux equivalent of "safely remove hardware" if you
are non-root.

All that needs to happen to change this is to append "users" to the mount
options when HAL creates the dynamic entry in fstab.

Currently, the only way to make HAL do this by default (that I can find) is
to set the key:
storage.policy.default.mount_option.users to true

But what if I don't want to set it to true by default, but only for
thumbdrives? Well, I tried using a set of match tags to narrow my selection
to only USB storage devices, then settings the key:
storage.policy.mount_option.users to true
but unfortunately, that key only applies when the device is non-partitioned.
Thus, I cannot custom adjust the mounting options for partitioned disks.

In the future, I would recommend that the
storage.policy.default.mount_option.* be a key that can be used for any sort
of disk, partitioned or not. I think this would aid developers in writing
rulesets for their distributions - stuff like "remove hardware safely"
scripts that worked for non-root users.

What do you think?

Steve

_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list