Bug#697003: initscripts: postinst fails: mv /dev/shm/* misses dot (hidden) files

Pierre Ynard linkfanel at yahoo.fr
Wed Feb 20 05:37:36 GMT 2019


While I think there were certainly good points raised about issues with
it, that mv code to migrate /{dev,run}/shm and contents in postinst was
long removed, and nowadays is only left code to set up directories and
symlinks at bootup, when they're still empty. All this `mv /run/shm/*
/dev/shm` stuff was removed 5 years ago in:


> debian: Clean up legacy migration logic in maintainer and init scripts

So I think this issue is mostly long resolved.

However there is one point that I can confirm can still be seen
today: it was pointed out that /dev/shm/.tmpfs shouldn't exist
after boot, yet it still does. It is indeed still created by
mount_shm() in /lib/init/mount-functions.sh, but not cleaned up by

Anybody can clear up what to think of this today?

> > # Remove bootclean's flag files.
> > # Don't run bootclean again after this!
> > rm -f /tmp/.clean /lib/init/rw/.clean /run/.clean /run/lock/.clean
> > rm -f /tmp/.tmpfs /lib/init/rw/.tmpfs /run/.tmpfs /run/lock/.tmpfs
> >
> > While here - could neaten this up a little:
> >
> > for dir in /lib/init/rw /tmp /run /run/lock /run/shm; do
> >     rm -f "$dir/.clean" "$dir/.tmpfs"
> > done
> That's much better, thanks.

This proposed snippet could still be relevant (apart from the part about
/lib/init/rw which doesn't exist anymore).

Pierre Ynard

More information about the Debian-init-diversity mailing list