From b6ec3caac4fc2ea5938a069b60558e140766f6c5 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 1 Jan 2012 09:20:36 -0800 Subject: [PATCH] Allow /run and /run/lock, document purpose of /run Patch by Thomas Hood based on an original patch by Roger Leigh. --- policy.sgml | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/policy.sgml b/policy.sgml index 79281e9..f512315 100644 --- a/policy.sgml +++ b/policy.sgml @@ -6249,11 +6249,30 @@ install -m644 debian/shlibs.package debian/package/DEBIAN/

The following directories in the root filesystem are - additionally allowed: /sys and - /selinux. These directories - are used as mount points to mount virtual filesystems - to get access to kernel information. -

+ additionally allowed: /run, + + The purpose of the /run hierarchy is storage of ephemeral + system state, that is, state information that should + not be preserved across a reboot. + Files and directories residing in /run + should be stored on a temporary filesystem. + The /run directory is a + replacement for /var/run; its + subdirectory /run/lock is a replacement for + /var/lock. + /run/ and /run/lock/ have been introduced + by most distributions and are on track to be + endorsed by the FHS. + Additionally, the subdirectory /run/shm + is a replacement for /dev/shm. + + /sys and /selinux. + + The /sys and /selinux + directories are mount points where + virtual filesystems are mounted which provide access + to kernel information. +

@@ -6762,15 +6781,17 @@ test -f program-executed-later-in-script || exit 0

- /var/run and /var/lock may be mounted - as temporary filesystems - For example, using the RAMRUN and RAMLOCK - options in /etc/default/rcS. - , so the init.d scripts must handle this - correctly. This will typically amount to creating any required - subdirectories dynamically when the init.d script - is run, rather than including them in the package and relying on - dpkg to create them. + Files and directories under /run, including those + in directories /var/run and /var/lock + which are symlinks or bind mounts to subdirectories of + /run, are normally stored on a temporary + filesystem and are normally not persistent across a reboot. + Consequently, packages cannot assume that these files or + directories are present at system boot time. + Files and directories under /run must not be + included in packages; such files or directories + must be created dynamically, for example, in the + init.d script.

-- 2.39.2