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

Henrique de Moraes Holschuh hmh at debian.org
Fri Dec 23 18:54:11 UTC 2005

On Fri, 23 Dec 2005, Thomas Hood wrote:
> no longer include /var/run/foo/.  In that case I think that we should offer
> a skeleton feature.  The package would include /etc/run/skeleton/foo/ and
> then the initscript that mounts /var/run would immediately do
>     cp -a /etc/run/skeleton/* /var/run

Is there a reason why something like this (real-life, from amavisd-new)
cannot be used instead?  Namespace colisions are taken care of by forcing
the use of the package name.

createdir() {
# $1 = user
# $2 = group
# $3 = permissions (octal)
# $4 = path to directory
        [ -d "$4" ] || mkdir -p "$4"
        chown -c -h "$1:$2" "$4"
        chmod -c "$3" "$4"
fixdirs() {
        dir=$(dpkg-statoverride --list /var/run/amavis) || {
                echo "You are missing a dpkg-statoverride on /var/run/amavis.  Fix it, otherwise you risk silent breakage on upgrades." >&2
                exit 1
        [ -z "$dir" ] || createdir $dir
        # clear exit status

case "$1" in
        echo -n "Starting $DESC: "

You get the idea.  I have this stuff in some very long standing packages,
and I have never got a BTS report from a user. A developer once hit it, but
that's because he was doing weird stuff with the package, and he had no
trouble fixing it either :-)

The overrides are created in postinst, removed in postrm purge.

Hmm, I'd really like to hack a dpkg-modifymanifest so that we could
runtime-register these things with dpkg.  It would be extremely cool.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

More information about the Pkg-sysvinit-devel mailing list