Subject: Re: perl scripts and *.conf file.
To: None <netbsd-users@NetBSD.org>
From: Chuck Yerkes <chuck+nbsd@2004.snew.com>
List: netbsd-users
Date: 04/01/2004 16:39:24
Quoting Pritesh (shahpritesh_email@excite.com):
> i've made a package which has a perl script and a .conf file.
>
> When using the command:
>
> perl <perlscript_filename> it checks for some variables in the .conf file
>
> my question is " Where do i install (location) this perl script and the .conf file ?"
"it depends"(tm).
run: man hier
Some etc dir is indicated.
If the script is in your $HOME/bin, then $HOME/etc is correct.
If it's system wide, then /usr/local/etc/ is correct (or /etc/).
You should also have a -C /path/to/config and perhaps a look
at an env variable ($PERLSCRIPT_FILENAME_CONFIG).
I generally have /usr/local/etc/ (and want /usr/pkg/etc/) mostly empty.
I *presume* that /usr/ will be shared.
sudoers is designed to be used in shared situations. Most others
configs aren't. My machines' /usr/local/etc/ has sudoers in it.
That's all.
I also want to know that a backup of /etc/ will pretty much grab
all the things that guide/configure my system.
I'd accept /etc/pkg/ (and/or /etc/local/) as a place for configs.
But the game of "find the startup script" in multiple hierarchies
just pisses me off. And I've been in the game with enough mixes
of machines to not want to be pissed off about it. (And sun's
/etc/opt/ is just disturbingly wrong, but then their /etc is filled
with symlinks for binaries that were moved out in SunOS 2 or 3 era
and they have pipes(!) in /etc. So clearly, they cannot be looked
to for good behavior).
If a package has 4 or more related files under /etc it gets its own
directory (as when openssh moved configs to /etc/ssh/).