Wireshark-bugs: [Wireshark-bugs] [Bug 2339] init. lua script should be configured through config
Date: Fri, 14 Mar 2008 12:38:24 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2339


Peter <pva@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|editable files, like        |init.lua script should be
                   |init.lua, should be in      |configured through config in
                   |sysconfdir                  |sysconfdir




--- Comment #5 from Peter <pva@xxxxxxxxxx>  2008-03-14 12:38:22 GMT ---
Sorry for long silence, I needed to reread FHS another time... Well, I was
wrong initially asking to put lua script into sysconfdir as sysconfdir is
wrong place for the scripts but in any case current behaviour is wrong. See
further.

(In reply to comment #3)
> So presumably the distinction the FHS is drawing is between files that might be
> configured on a per-system basis and files that, even though they're in theory
> read-only, might be modified to add updates, e.g. the RADIUS and DIAMETER
> dictionaries? (I.e., the changes would be appropriate for all machines, rather
> than machine-specific tweaks - the sort of changes that might show up in a
> later release?)

Yes.

> ("/usr/share" dates back to SunOS 4.0, [..snip timezone data example..] )

> [..snip not host-specific but occasionally changing files..]


The difference between sysconf/data files should be following: If after
installation of package you may need to edit file to get desired behaviour of
the program then put this files into sysconfdir, in other case consider files
to be data and put them either in datadir or /var/lib/@package@ (all files are
fresh so no occasion update could be required at this moment).

Actually the less files you have in sysconfdir the better it is, as
practically all files in sysconfdir during upgrading of installation are
subject to manual intervention in and this means that the more files we have
there more time system administrator will spent on upgrading. Of course this
linear dependency on number of files is a bit overestimated as currently there
are tools which help system administrator to cope with configuration files
upgrade but general idea still stands.

Speaking about difference of what data files to put in datadir and what in
/var/lib/wireshark consider the following: If updates are required for program
to function normally, put that files into /var/lib/wireshark. Antivirus
database or exploit database, mail, logs are best examples of such files.
RADIUS dictionaries and e.g. timezone data are not of this kind so it's normal
to put them into datadir. Yes this data could be changed, like in your example
of timezone data, but in this case it's system administrator work to update
that files on nfs share and propagate changes on users systems.

Now returning to lua script. FHS does not tell anything about correct location
for scripts. There is just one note, that if program is not intended to be run
by user it should not be in {,/usr,/usr/local}/{,s}bin. Two possible locations
are (as used by other software):

* /usr/lib/wireshark:
* /usr/share/wireshark:

but I think that lib location is better suited for binary (compiled) data. So
/usr/share/wireshark is correct location. The only thing that should be
changed that all things that require modification to run lua scripts should be
moved into sysconfdir and sourced by script at run time.

Thank you for reading that.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.