[Pm-utils] [patch-commit] create directories and logfile

Till Maas opensource at till.name
Wed Jan 30 07:47:16 PST 2008


On Wed January 30 2008, Victor Lowther wrote:
> On Jan 30, 2008 8:50 AM, Till Maas <opensource at till.name> wrote:
> > On Wed January 30 2008, Michael Biebl wrote:
> > > 2008/1/30, Michael Biebl <mbiebl at gmail.com>:
> > > > 2008/1/30, Stefan Seyfried <seife at suse.de>:
> > > > > On Wed, Jan 30, 2008 at 12:49:22AM +0100, Till Maas wrote:
> > > > > > Hiyas,
> > > > > >
> > > > > > here is a pathc with following changes:
> > > > > >
> > > > > >     - create logfile and used directories on install
> > > > > >     - do not remove used directories, but clean them
> > > > > >
> > > > > > This patch makes sure that /var/run/pm-utils{,/storage} are
> > > > > > created on make install
> > > > >
> > > > > Isn't this useless since /var/run is cleared at boot anyway (or was
> > > > > this some other directory)?
> > > >
> > > > FHS only mandates that files in /var/run are cleared [1]. TTBOMK,
> > > > directories are preserverd (unless you have a tmpfs on /var/run).
> >
> > Fedora for example does not remove directories in /var/run, but only
> > files, but some special directories that may be there e.g. for samba,
> > vmware.
>
> I would still mkdir -p them on every invocation -- it costs us nearly

Yes, I did not plan to change this.

> nothing if our needed directories are already there, and will work
> whether or not /var/run is a tmpfs filesystem.  IIRC, nothing in the
> FHS mandates that the directory structure under /var/run be preserved
> across reboots.  On Ubuntu, for example, /var/run is tmpfs.
>
> > > OTOH, I think Stefan is right.
> > > For one, because you use a hard coded path in install-exec-local which
> > > could be different to  STORAGEDIR and PM_LOGFILE defined in functions
> > > (btw, shouldn't this variable definitions not better be moved to
> > > defaults).
> >
> > I can adjust the patch, so that STORAGEDIR and PM_LOGFILE is also created
> > by autotools. Then there would be no difference. Btw. /etc/pm/* is also
> > created on install but left empty. Imho it is better beheaviour when all
> > directories that belong to the package are created on install, e.g. for
> > rpm to own the directory, it must also exist.
>
> True, but I would still mkdir -p our lock & storage directories on
> every invocation.

No changing plans here, too.

Regards,
Till
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/pm-utils/attachments/20080130/d79bb3be/attachment.pgp 


More information about the Pm-utils mailing list