[Techtalk] debian init.d file to create log directory?

Chris Frey cdfrey at foursquare.net
Wed Feb 10 20:45:16 UTC 2010


On Wed, Feb 10, 2010 at 11:39:14AM -0800, Maria McKinley wrote:
> What is the best way to create this 
> directory on boot? Should I just add something to /etc/init.d/munin to 
> create the directory?

It's a judgment call, in my books.  I like putting admin-specific stuff
in /etc/rc.local, since that is meant to be changed, but the scripts
in /etc/init.d come from the packages themselves.

The problem here is that /etc/rc.local runs last.  You can change that
by changing the startup order of the symlink in your runlevel
(/etc/rc?.d/S99rc.local).  Change 99 to something lower than munin's
number.

It all depends which is easiest for you, and whether you'll remember
which file you changed to make it work.  That's usually my problem. :-)


> I noticed that cups manages to create its own log 
> directory on boot, but couldn't see anything in the init.d file that 
> actually creates the file, so maybe there is somewhere else that it 
> should be created?

A quick look at the cups source code seems to indicate to me that
it creates directories in the C code, if needed.  The debian packaging
scripts also create the directories.

- Chris



More information about the Techtalk mailing list