Bug 149221 - RFE: allow user-customizations
RFE: allow user-customizations
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-21 09:03 EST by Enrico Scholz
Modified: 2013-03-05 22:42 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-12 19:53:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2005-02-21 09:03:22 EST
Description of problem:

Please make it possible to customize the hal behavior (e.g. do not use
'sync' option for usbdisks).

A simple way would be the creation of a symlink like

/usr/share/hal/fdi/99localpolicy -> /etc/hal/localpolicy

so that the administrator can put a local policy under /etc/hal/...


Version-Release number of selected component (if applicable):

hal-0.4.7-1.FC3
Comment 1 David Zeuthen 2005-03-21 13:21:45 EST
This is indeed possible already; see 'man fstab-sync' for details.
Comment 2 Enrico Scholz 2005-03-21 13:46:44 EST
Hmm... can you explain this please? 'man fstab-sync' of hal-0.5.0.cvs20050318-1
 tells only, how to disable fstab-syncing (but the description seems to be wrong
as there does not exist a /etc/hal/device.d directory).

Else, only the /usr/share/hal/fdi/ directory is mentioned as place for
configuration files. But this is unrelated as no local configuration can be
placed there.
Comment 3 David Zeuthen 2005-03-21 13:56:09 EST
You filed this against hal-0.4.7-1.FC3 for the Fedora Core 3 product and that is
explained in both the man page and the hal spec for hal 0.4 here 

 http://people.redhat.com/davidz/hal-spec/hal-spec.html

as well as the example files referenced from the fstab-sync man page. Also see
this article for background

 http://www.redhat.com/magazine/003jan05/features/hal/

So, I'm closing this bug again since hal 0.4.x is what is in FC3 and this
already works.

Note that this is going to change a bit for hal 0.5, we're working upstream to
make this simpler; notably the examples and spec needs to be updated; it's
somewhat in flux right now but I expect this to be done for FC4.
Comment 4 Enrico Scholz 2005-03-21 14:45:09 EST
I do not see a big difference between the manpage of hal-0.4 and
0.5. E.g. I have a device configurationfile like

| <?xml version="1.0" encoding="ISO-8859-1"?>
| <deviceinfo version="0.2">
|   <device>
|     <match key="@block.storage_device:storage.drive_type" string="disk">
|       <match key="@block.storage_device:storage.bus" string="usb">
|         <merge key="volume.policy.mount_option.sync" type="bool">false</merge>
|       </match>
|     </match>
|   </device>
| </deviceinfo>


With current hal, I do not see how I can bring hald to recognize
it. The webpages mentioned by you do not tell this either; the only
files under /etc are

* /etc/fstab (which is the output and uninteresting therefore), and
* /etc/hal/device.d, /etc/hal/capability.d, /etc/hal/property.d which
  contain callout programs; perhaps I could write a wrapper there, but
  the device configuration file listed above is much easier.


Sorry, when I am blind, but where have I to place the configuration
file above?
Comment 5 David Zeuthen 2005-03-21 14:51:47 EST
> With current hal, I do not see how I can bring hald to recognize
> it.

I said the following in comment 3:

 "Note that this is going to change a bit for hal 0.5, we're working upstream to
 make this simpler; notably the examples and spec needs to be updated; it's
 somewhat in flux right now but I expect this to be done for FC4"

so you have to wait a little bit for this. Changing version to devel and state
to ASSIGNED; will close this once the format settles.

Comment 6 Enrico Scholz 2005-03-21 15:07:47 EST
How can I configure this in hal-0.4? hal-0.5 was used only to have an up-to-date
version of the man-page.
Comment 7 David Zeuthen 2005-03-21 15:29:53 EST
See what I said in comment 3, especially the files mentioned in the man page for
fstab-sync should be helpful.
Comment 8 Enrico Scholz 2005-03-21 15:37:38 EST
Perhaps I am really blind, but fstab-sync(8) does not tell any file which can be
used for local configuration. The only files mentioned there (searched by /\s/) are:

* /etc/fstab  -->  output
* /media  -->  no configuration place
* /usr/share/...  -->  no configuration place
*  /etc/hal/device.d  -->  place for callout *scripts*

More files/paths are not mentioned in the man-page.
Comment 9 David Zeuthen 2005-03-21 15:42:40 EST
The man page states

 By  default,  the /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi
 file specifies the policy - this file should never  be  edited  by  the
 system administrator as it might get updated by the OS vendor for secu-
 rity updates. Instead, system- or site-specific rules can be put in the
 /usr/share/hal/fdi/95userpolicy directory.

So, /usr/share/hal/fdi/95userpolicy is the location you want. The snippet posted
in comment 4 can be put there as a file with the ".fdi" extension, e.g.
my-storage-policy.fdi.

I want to say here that this is indeed pretty complicated, sorry about that. As
stated, I hope to clean up the format for FC4 but I don't expect it to be much
easier. The long term plan is to expose this through the desktop UI and then it
will get much simpler to tweak.
Comment 10 Enrico Scholz 2005-03-21 15:51:04 EST
No, /usr/share/hal/fdi/95userpolicy is not a suitable location. Files under
/usr/... MUST NOT be used for local configuration; only /etc or perhaps /var or
available place. That's why I suggested in comment #1 a symlink

| /usr/share/hal/fdi/99localpolicy -> /etc/hal/localpolicy


When I would place my configuration under /usr/share/..., lots of unwanted
things might happen. E.g. when I have two machines A und B sharing a common
/usr, where A is used by an expert who knows that USB sticks must be unmounted
after use (--> prefers 'nosync') while B is used by a beginner who should use
'sync', both would have the same configuration.
Comment 11 David Zeuthen 2005-03-21 16:09:35 EST
Ehrm, but this is exactly how it will work for FC4, check this from the upstream
mailing list

 http://lists.freedesktop.org/archives/hal/2005-February/002218.html

It's just not done yet so I haven't updated the docs just yet.

And, no, I'm not going to fix the bug for FC3, sorry.

Note You need to log in before you can comment on or make changes to this bug.