[Infrastructures] how to build an internal (local) file structure?
Ben Hartshorne
infrastructure@green.hartshorne.net
Thu, 24 Mar 2005 17:27:55 -0800
--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Mar 24, 2005 at 12:26:26PM -0600, Mike wrote:
> I don't like how previous administrators have set the internal,
> home-grown scripts. Currently everything is just thrown into
> /commands. What I want is to change the structure so that it
> looks more like:
>=20
> /COMPANY
> /bin
> /lib
> /etc
>=20
> Like a typical unix box. My question is for things like data,
> mapping, resource, or configuration files... where should they
> go? If there is a file 'mapping.pl' that needs the file
> 'mapping.cfg', certainly the 'mapping.pl' goes in
> /COMPANY/bin. Does the 'mapping.cfg' go into /COMPANY/lib,
> /COMPANY/etc, or somewhere else?
>=20
> What makes sense?
There are 80 million ways that 'make sense,' at least to their creator. =20
One mentioned by Ivan is pretty popular, and I've worked with a layout
like it before. He said:
On Thu, Mar 24, 2005 at 09:03:57PM +0100, Ivan Popov wrote:
> Hello Mike,
>=20
> My view would be rather
>=20
> /COMPANY/sw/mapping/bin/mapping.pl
> | | 'config/mapping.cfg
> | 'otherprog/exe/otherprog.exe
> | 'dll/smth.dll
> | ....
> 'bin/mapping.pl -> /COMPANY/sw/mapping/bin/mapping.pl
> 'otherprog.exe -> /COMPANY/sw/otherprog/exe/otherprog.exe
>=20
basically, creating a subdir for each vendor, and then creating a
massive symlink farm in COMPANY/bin that gets you to all the right
places (so you don't have to add everyone's individual bin path to your
PATH). =20
Pretty much any time I have any question about where something is
'supposed' to go, I reference the Filesystem Hierarchy Standard:
http://www.pathname.com/fhs/
though verbose, it can answer pretty much all those sorts of questions.
In fact, it recommends the above solution (more or less), putting all
the vendor packages in /opt, except for configuration files (your
question), which should be put in /etc/opt. One reason I can think of
for the exception is that you might have a different backup strategy for
configuration files from program files or data files, and it is nice to
be able to just grab /etc/ and know that you have all the application
configuration files you need. =20
I'm not sure if this is the sort of thing you were asking, but though
I'd contribute anyways... ;)
-ben
--=20
Ben Hartshorne
email: ben@hartshorne.net
http://ben.hartshorne.net
--MGYHOYXEY6WxJCY8
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCQ2kaKeT3tvTdv64RAhZdAJ9Rjs9nkiIZ3C8xdplrCh4wv6hJhQCdG/LJ
zaluc5D3bnwJWuLncc+Xszo=
=F/F4
-----END PGP SIGNATURE-----
--MGYHOYXEY6WxJCY8--