[Pkg-sysvinit-devel] Re: Supporting tmpfs on /var/run

Thomas Hood jdthood at yahoo.co.uk
Wed Jan 4 22:56:37 UTC 2006


0. Don't initialize /var/run at all
1. Copy a skeleton dir to /var/run
2. Use dpkg-statoverride to store information needed for initializing /var/run

Looking for a better option ...

Can anyone think of a way to support ephemeral /var/run and packages
including directories under /var/run/ and one of our initscripts using the latter
information to initialize the skeleton of /var/run?

One idea would be to let dpkg create the directories in /var/run/; an initscript
would save the skeleton of /var/run/ at shutdown and another would restore it
after /var/run is mounted on boot.  But that wouldn't be very robust.

Could we do something like:

    mkdir -p $(dpkg -L $(dpkg-query -l \* | awk ' { print $2 }') 2>/dev/null | grep /var/run | sort | uniq)

only faster, and in such a way that we also set owner, group and permissions as
they are set in the package?

If we could do this then there would be no need to modify any packages to support
ephemeral /var/run/, no need for a skeleton dir in /etc, and no need for the
package to run dpkg-statoverride (though that could also be supported).

$ dpkg -L $(dpkg-query -l \* | awk ' { print $2 }') 2>/dev/null | grep /var/run | sort | uniq
/var/run
/var/run/alsa
/var/run/cups
/var/run/dbus
/var/run/dovecot
/var/run/dovecot/login
/var/run/hal
/var/run/pppconfig
/var/run/screen
/var/run/sshd
-- 
Thomas



More information about the Pkg-sysvinit-devel mailing list