Skip to contentSkip to conversation

hotplug: create /var/run/xenstored in xencommons

PATCH In review Olaf Hering 1 participant 2 messages Aug 12, 2011 – Aug 18, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hotplug: create /var/run/xenstored in xencommons

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1313132827 -7200
# Node ID d3c5f8c4c8ede777eb3f686306ec36ca677c2422 # Parent 1f08b380d4386cdd6714786a9163e5f51aecab5d
hotplug: create /var/run/xenstored in xencommons

In recent Linux distributions all volatile runtime data was moved to a tmpfs mounted on /run. /var/run is a symlink to that directory. Create /var/run/xenstored unconditionally on startup, use -p to ignore errors.

tools/hotplug/Linux/init.d/xencommons +1 -0
diff -r 1f08b380d438 -r d3c5f8c4c8ed tools/hotplug/Linux/init.d/xencommons
@@ -52,6 +52,7 @@ do_start () {
 		test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
 
 		echo -n Starting xenstored...
+		mkdir -p /var/run/xenstored
 		xenstored --pid-file=/var/run/xenstored.pid $XENSTORED_ARGS
 
 		# Wait for xenstored to actually come up, timing out after 30 seconds
#1 lore raw
Quoted 10 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1313132827 -7200
# Node ID d3c5f8c4c8ede777eb3f686306ec36ca677c2422 # Parent 1f08b380d4386cdd6714786a9163e5f51aecab5d
hotplug: create /var/run/xenstored in xencommons

In recent Linux distributions all volatile runtime data was moved to a tmpfs mounted on /run. /var/run is a symlink to that directory. Create /var/run/xenstored unconditionally on startup, use -p to ignore errors.

Please ignore this patch, xenstored creates the directory:

tools/xenstore/xenstored_core.c:1811: if (mkdir(xs_daemon_rundir(), 0755)) {

Olaf