summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-05-11 17:01:14 +0000
committerBaserock Gerrit <gerrit@baserock.org>2015-05-27 14:16:43 +0000
commit9be39cd71592cfd77619afc732f66649c3bb66da (patch)
tree4fb3b8bf077929b452c76b1f57a06fe3a99c5af8
parent5e488033b187e53e28495e98055603281282502a (diff)
downloaddefinitions-9be39cd71592cfd77619afc732f66649c3bb66da.tar.gz
essential-files: Support generating shutdownramfs
When combined with a cluster that installs an initramfs as a sysroot in /usr/lib/shutdownramfs which has a /shutdown binary, this makes systemd pivot into the shutdownramfs on shutdown. Change-Id: I5ed64a3c86641d61de8b6ced644f36635be5dcf4
-rw-r--r--essential-files/manifest4
-rw-r--r--essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf4
2 files changed, 8 insertions, 0 deletions
diff --git a/essential-files/manifest b/essential-files/manifest
index 960111c4..2b77c237 100644
--- a/essential-files/manifest
+++ b/essential-files/manifest
@@ -2,3 +2,7 @@
overwrite 0100644 0 0 /etc/os-release
overwrite 0100644 0 0 /etc/profile
overwrite 0100644 0 0 /etc/inputrc
+0040755 0 0 /usr
+0040755 0 0 /usr/lib
+0040755 0 0 /usr/lib/tmpfiles.d
+0100644 0 0 /usr/lib/tmpfiles.d/shutdownramfs.conf
diff --git a/essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf b/essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf
new file mode 100644
index 00000000..174f1f03
--- /dev/null
+++ b/essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf
@@ -0,0 +1,4 @@
+# If /usr/lib/shutdownramfs has been populated, copy it into /run/initramfs so
+# /run/initramfs/shutdown will be executed on shut-down, so that it may unmount
+# the rootfs.
+C /run/initramfs - - - - /usr/lib/shutdownramfs