/var/run questions

Derek Broughton news at pointerstop.ca
Wed Feb 22 14:03:14 UTC 2006


Richard Barry wrote:

> No replies!  Ok, let me give the short version of the question:
> How do I run a script as root on startup?  Is /etc/rcS.d/ the best/only
> way?

Scripts for startup would usually be in /etc/init.d/, then you can symlink
them from any of the rc*.d directories (update-rc.d).  I'm not sure there's
a reason to have a webdav mount unless you've got a gui, so the link
probably belongs in rc2.d.

Now, /var/run is for things like pid files. pid files _should_ go away when
you stop the process - in this case, when it's unmounted.  So the correct
procedure would be to make the mount process create the pid file, not the
installer - probably requiring you to submit a bug report.
-- 
derek





More information about the ubuntu-users mailing list