aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2016-01-07 16:58:56 -0800
committerAndy Lutomirski <luto@kernel.org>2016-01-07 16:58:56 -0800
commit0d61d88ffff6d2670d3c2ee1d123a1cd67fd2cba (patch)
treeeb3b82918f11d0c068dad7776535dd49a6a8b597
parent2cf2cd60d4dcc96fe06b46542bb2af1e15fa82ee (diff)
downloadvirtme-0d61d88ffff6d2670d3c2ee1d123a1cd67fd2cba.tar.gz
virtme-init: Run systemd-tmpfiles if available
A bunch of service depend on /run being fully set up, and systemd-tmpfiles is a common way to set it up. Invoke it. Signed-off-by: Andy Lutomirski <luto@kernel.org>
-rwxr-xr-xvirtme/guest/virtme-init6
1 files changed, 6 insertions, 0 deletions
diff --git a/virtme/guest/virtme-init b/virtme/guest/virtme-init
index cfff41a..238c482 100755
--- a/virtme/guest/virtme-init
+++ b/virtme/guest/virtme-init
@@ -85,6 +85,12 @@ log "basic initialization done"
######## The remainder of this script is a very simple init (PID 1) ########
+# Does the system use systemd-tmpfiles?
+tmpfiles=`which systemd-tmpfiles 2>/dev/null` && {
+ log "running systemd-tmpfiles"
+ systemd-tmpfiles --create --boot --exclude-prefix="/dev"
+}
+
# Try to get udevd to coldplug everything.
# We could use virtme-loadmods as a lightweight alternative.
if [[ -n "$udevd" ]]; then