Subject: Re: [dtn-users] DTN has non standard dir in var

From: Elwyn Davies <[email-masked]>
Date: Sat, 03 Dec 2011 16:54:05 +0000

Hi, Leo.

Having investigated the FHS reference, I don't  think /var/cache/dtn
would be the right answer even if FHS was generally accepted as a 'cast
in concrete standard' - it has useful guidelines but no more.  Quoting
from Wikipaedia (always a dangerous pursuit), we have:

/var/ 
        Variable files—files whose content is expected to continually
        change during normal operation of the system—such as logs, spool
        files, and temporary e-mail files. Sometimes a separate
        partition. 
        /var/cache/
                Application cache data. Such data is locally generated
                as a result of time-consuming I/O or calculation. ***The
                application must be able to regenerate or restore the
                data. The cached files can be deleted without data
                loss.*** (my emphasis)
                
You would therefore have to be able to regenerate all the files
automatically.  This is definitely not the case for many of the files
made by dtnd.  There is original info in them and deleteing it can be a
disaster for a running system.

So I think it is fair enough to live with /var/dtn.  It would also cause
a certain amount of grief to people if we change the defaults without a
really good reason.

Regards,
Elwyn

On Fri, 2011-11-11 at 18:57 +0100, Leo Iannacone wrote:
> On 11 November 2011 18:44, Elwyn Davies <[email-masked]> wrote:
> > Hi, Leo.
> >
> 
> Hi Elwyn,
> 
> > The location of the data is controlled by the dtn.conf configuration
> > file.
> >
> > If you would prefer not to use /var/dtn tweak the dbdir value being
> > used.
> 
> I know, what I'm asking is: Is it possible change it by default?. In
> other words: "could it be changed in the DTN branch?"
> 
> This is just to make things in "standard way".
> 
> Moreover, consider that in some files you have this reference to
> /var/dtn, to be more precious:
> 
> ~/DTN2 $ grep -r '/var/dtn' * | cut -d':' -f1 | uniq
> 
> apps/dtnperf/dtnperf-client.c
> apps/dtnperf/dtnperf-server.c
> apps/dtnperf/dtnperf-details.txt
> daemon/dtn.conf
> debian/dtn.postinst
> debian/dtn.init.d
> debian/dtn.logrotate
> debian/dtn.postrm
> doc/manual/configuration.html
> doc/manual/man_dtncpd.html
> servlib/cmd/StorageCommand.cc
> tools/uninstall.sh
> 
> > Actually there is an issue with the example dtn.conf in the current
> > SourceForge distribution.  A hard coded dbdir has crept in at chanegset
> > 3523.
> > Line 86: set dbdir /home/user/workspace/hg_10_10_11/dbdir
> >
> > This should not be there.
> 
> Right...
> 
> >
> > Regards,
> > Elwyn
> >
> 
> Regards,
> 
> Leo.
> 
> 
> > On Fri, 2011-11-11 at 18:14 +0100, Leo Iannacone wrote:
> >> By default, dtn uses /var/dtn to store bundles and db, but it isn't
> >> the standard way.
> >>
> >> The FHS says "Applications should generally not add directories to the
> >> top level of /var. Such directories should only be added if they have
> >> some system-wide implication, and in consultation with the FHS mailing
> >> list."
> >>
> >> Refer to Filesystem Hierarchy Standard(1) (The /var Hierarchy (2)) for details.
> >>
> >> I suggest to move all in /var/cache/dtn/
> >>
> >> Is it possible do it editing code?
> >>
> >> Best regards,
> >> Leo.
> >>
> >> REF:
> >> 1 - http://www.pathname.com/fhs/pub/fhs-2.3.html
> >> 2 - http://www.pathname.com/fhs/pub/fhs-2.3.html#THEVARHIERARCHY
> >> _______________________________________________
> >> dtn-users mailing list
> >> [email-masked]
> >> https://www.irtf.org/mailman/listinfo/dtn-users
> >
> >