Create a new directory in /var/log/

James Cameron quozl at laptop.org
Mon Oct 18 18:27:10 EDT 2010


On Mon, Oct 18, 2010 at 9:22 AM, Daniel Castelo wrote:
> We want to register some events in /var/log/new_dir, if I create the
> directory "new_dir" manually and then I restart the machine the directory is
> deleted.

In addition to /etc/init.d/foo as Martin suggests, /etc/rc.local might
also be used, or test for and create the directory before logging these
events you describe.

But it remains on a tmpfs, so it will not be preserved.  If you want
preserved data, don't use /var/log.

See /proc/mounts for other tmpfs to avoid.

-- 
James Cameron
http://quozl.linux.org.au/



More information about the Devel mailing list