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

Re: Perhaps programs should create the subdirectories they use for their temporary files

On Saturday 04 April 2009 19:00:54 Guus Sliepen wrote:
> On Sat, Apr 04, 2009 at 01:54:07AM +0200, Michael Biebl wrote:
> > > contact a running daemon.  Could you explain what policykit uses /var/run
> > > for, and educate me a bit on why D-Bus services have to put things in
> > > /var/run but don't have init scripts?
> > 
> > PolicyKit stores credentials in /var/run/PolicyKit which are of temporary nature
> > and are automatically cleaned up on boot.
> I maintain a lot of systems that run on CompactFlash cards of a few GB, but
> also have 1 or 2 GB of RAM. I mount a tmpfs over /var/cache/apt/archives, so I
> can upgrade the system without using a large amount of space on flash, and to
> prevent wear. Apt always complains about /var/cache/apt/archives/partial not
> being there, so I either have to write an init script that creates it after the
> tmpfs is mounted, or (what I normally do is to) have a small script to perform
> updates, which creates the missing directories.
> The problem is that some programs (apt-get, PolicyKit, etc.) store temporary
> files in /var/run or /var/cache in their own subdirectories, but expect
> something else to create these directories for them. I think we should require
> these programs to create their own subdirectories at runtime. It is very simple
> to add an mkdir() command to these programs. If the directory already exists,
> it is a no-op.

wpa_supplicant and hostapd do this, and saves all this bollucks about providing
an initscript for this sole purpose. Thanks for mentioning it Guus.

Thanks, Kel.

Reply to: