/var/run questions

Richard Barry rbarry at sunspace.co.za
Wed Feb 22 06:43:25 UTC 2006


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?

________________________________

From: ubuntu-users-bounces at lists.ubuntu.com
[mailto:ubuntu-users-bounces at lists.ubuntu.com] On Behalf Of Richard Barry
Sent: 21 February 2006 15:15
To: Ubuntu Help and User Discussions
Subject: /var/run questions



I'm trying to use davfs2 to mount a webdav directory locally.  After I
install davfs2 I can mount, but after the first reboot I get a message:

/usr/lib/mount.davfs-2.6: Could not open pid-file 

After some investigating I found out that davfs2 wants to create a pid file
in /var/run/mount.davfs . mount.davfs is created by the installer, but after
I reboot it disappears.  Now my question is:  Why is it removed?  What
manages the /var/run dir? Can I stop it from being removed somehow?  If not,
I would be able to get it working if I could run the following as root when I
boot up:

$ mkdir /var/run/mount.davfs 
$ chown root.users /var/run/mount.davfs 
$ chmod 1774 /var/run/mount.davfs 

What is the best way to do that?  Should I create a script in /etc/rcS.d/ to
execute these commands or is there a better way to run scripts as root on
startup?

Thanks, 
Richard 

This e-mail and any accompanying attachments are confidential and for use of
the intended recipient only. If the message is received by anyone other than
the addressee, please return the message to the sender by replying to it and
then delete the message from your computer. Sun Space and Information Systems
(Pty) Ltd (SunSpace) does not accept responsibility for changes made to this
message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of any
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by
SunSpace in this regard and the recipient should carry out such viruses and
other checks it considers appropriate. 

If verification of this e-mail or any attachment is required, please request
a hard-copy version.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060222/bcbea32d/attachment.html>


More information about the ubuntu-users mailing list