[Clfs-dev] /var/run
sjs205
sjs205.linux at gmail.com
Fri May 13 04:15:37 PDT 2011
Hello All,
Every couple of days I manage to inadvertently cut the power to my CLFS
x86 server. Since I only really SSH to this box this presents a problem
since the SSH pid file doesn't get removed on power failure so I have to
connect up a screen, delete /var/run/sshd.pid then restart ssh.
This is caused by the static setup of the /var/run dir so I have decided
to address this.
My plan:
* Create a start-up script in /etc/rc.d/init.d that will remove all
files from the /var/run directory, then mount a tmpfs using /var/run as
the mount point.
With this in mind, before I start, just a few questions related to this:
* Should this be a separate script in init.d or should I add it to an
existing one? I am thinking that a script is required for the removing
old PID files, but the mounting of the tmpfs could be carried out by
S30mountfs - by adding a mount point to /etc/fstab - in the
/etc/rc.d/rcsysinit.d/ directory.
* Can anybody recommend a size for the tmpfs. Running 'du -ah' on the
/var/run dir, the contents are only 96 k, but then the same command on
my Fedora box shows the dir to be 1.8 MB in size.
Does everyone agree that this is a necessary course of action? Any
comments or recommendations welcome - I am generally on the CLFS IRC so
come chat there or just return email.
sjs205
More information about the Clfs-dev
mailing list