[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: links to logs in /etc? (/etc/postgresql/7.4/main/log)



Oliver Elphick wrote:
On Sun, 2005-06-12 at 16:25 -0700, Erik Steffl wrote:

  why is there a link to logs in /etc?

/etc/postgresql/7.4/main/log is a link to /var/log/postgresql/postgresql-7.4-main.log

/etc is supposed to be for configuration files that are static, the link to log violates both (yes, it's only a link so it doesn't change but points to a file that changes and is definetely not a configuration file).

  is this a bug? Or is this somehow valid?


Policy says that conffiles should be in /etc, or, if that is not
feasible, that there should be a link to /etc.  (Policy 10.7.2)

Policy also states that packages must conform to the FHS.  The FHS
states that site-specific configuration files should be in /etc and that
binaries should not be.  It also says that log files should usually be
under /var/log.

It is not stated that other types of file must not be put in /etc, still
less that there should be no links to such files.  By analogy with
10.7.2, it seems reasonable to allow a link if it is not feasible to do
without it.

isn't the reasonable interpretation of FHS that only what is supposed to be in a particular directory is supposed to be there, i.e. that ONL:Y static config files should be in /etc tree?

Reading FHS it seems the only reasonable interpretation, otherwise one could claim to be FHS compliant while having junk file all over the place.

I mean regardless of details of interpretation - is there any rationale for link to log to be in /etc? If there's none it simply shouldn't be there, IMO (otherwise you guys (I'm not a dd) are creating a mess of a system with unneccessary illogical links/files all over the place).

btw I am not sure which package is this part of, can't find it using dpkg -S, not even when I dpkg -L all postgresql packages I have installed (I guess it was created by postinst sript or something like that).


The name indicates that it is created by postgresql-common
(/usr/bin/pg_createcluster) in relation to a database whose server is
postgresql-7.4

it's a bit off topic but could you please explain how does the name /etc/postgresql/7.4/main/log indicate it was created by postgresql-common (as opposed to any other postgrsql-* packages, e.g. postgresql-7.4 seems like a good candidate as well)?

What does /usr/bin/pg_createcluster have to do with anything? OK, so I looked at it and the script actually creates that link (/etc/postgresql/7.4/main/log), seems pretty evil. Any ideas why would anybody do it?

	erik



Reply to: