On 09:21 Thu 14 Jul , Ira Weiny wrote: > On Thu, 14 Jul 2011 09:10:56 -0700 > Jason Gunthorpe <jguntho...@obsidianresearch.com> wrote: > > > On Wed, Jul 13, 2011 at 05:40:57PM -0700, Roland Dreier wrote: > > > On Wed, Jul 13, 2011 at 1:26 AM, Alex Netes <ale...@mellanox.com> wrote: > > > > +dnl Where to place opensm.pid > > > > +piddir=/var/run > > > > > > FWIW the future seems to be /run instead of /var/run, eg > > > http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html > > > > > > Not sure what the best way to handle this in a way that doesn't cause > > > hassles for packagers is. > > > > Donno, I find it still unclear if /run is just for early boot stuff > > that might start prior to /var being mounted or a general replacement > > for all /run directories - I think it is the just for early boot > > stuff, and /var/run will bind mount/symlink to it (maybe forever?)? > > > > In any event, it is the packager's responsibility to understand details > > like this for their distribution.. >
There is a Filesystem Hierarchy Standard from 2004, which define the use of /var/run/ as: This directory contains system information data describing the system since it was booted. Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process. Programs may have a subdirectory of /var/run; this is encouraged for programs that use more than one run-time file. [42] Process identifier (PID) files, which were originally placed in /etc, must be placed in /var/run. The naming convention for PID files is <program-name>.pid. For example, the crond PID file is named /var/run/crond.pid. http://proton.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA > It seems like the right thing to do would be to use an autoconf variable like > "localstatedir". But every reference I find seems to indicate it is not > automatic to say the least... > > http://www.linuxfromscratch.org/pipermail/lfs-support/2003-June/017720.html > http://openbsd.monkey.org/ports/200001/msg00065.html > http://www.spinics.net/lists/ac/msg04439.html > > http://fedoraforum.org/forum/showthread.php?t=262824 > https://bugzilla.redhat.com/show_bug.cgi?id=702769 > > :-( > There is some confusion about the usage of localstatedir. Here is a definition of localstatedir: http://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables ‘localstatedir’ The directory for installing data files which the programs modify while they run, and that pertain to one specific machine. Users should never need to modify files in this directory to configure the package’s operation; put such configuration information in separate files that go in ‘$(datadir)’ or ‘$(sysconfdir)’. ‘$(localstatedir)’ should normally be ‘/usr/local/var’, but write it as ‘$(prefix)/var’. (If you are using Autoconf, write it as ‘@localstatedir@’.) Moreover, localstatedir= ${prefix}/var could be overwritten by using config.stte script as described here: http://www.gnu.org/software/autoconf/manual/autoconf.html#Site-Defaults So I guess we can define the default piddir=@localstatedir@/run/ unless the user decides to overwrite it and hope that the packager is using appropriate site.conf. But if he doesn't, the default would be /usr/local/var/run which isn't a good thing though. > Ira > > > > > Jason > > > -- > Ira Weiny > Math Programmer/Computer Scientist > Lawrence Livermore National Lab > 925-423-8008 > wei...@llnl.gov > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html