summaryrefslogtreecommitdiffstats
path: root/install/shutdown
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-11-15 15:25:20 +0100
committerDave Reisner <dreisner@archlinux.org>2012-01-05 21:14:25 +0100
commit03deaed9f3f5b0c0537eb65e8f1862f53bc21fec (patch)
treea7ae64df327b4f1351ede76d0efd6e9a9bdf7053 /install/shutdown
parentbd4f7d6ee8f8527625b9f240a7e5b68b2d1f87bb (diff)
downloadmkinitcpio-03deaed9f3f5b0c0537eb65e8f1862f53bc21fec.tar.gz
mkinitcpio-03deaed9f3f5b0c0537eb65e8f1862f53bc21fec.tar.xz
shutdown: add new hook0.8.1
This adds functionality to pivot to back to the initramfs on shutdown, thereby allowing the system to unmount the real root device. This will be necessary for anyone with /usr as a separate partition.
Diffstat (limited to 'install/shutdown')
-rw-r--r--install/shutdown17
1 files changed, 17 insertions, 0 deletions
diff --git a/install/shutdown b/install/shutdown
new file mode 100644
index 0000000..2c533b6
--- /dev/null
+++ b/install/shutdown
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+build() {
+ BINARIES='cp findmnt'
+ SCRIPT='shutdown'
+
+ add_file "/lib/initcpio/shutdown" "/shutdown"
+}
+
+help() {
+ cat <<HELPEOF
+This hook copies the contents of the initramfs into /run/initramfs for reuse
+on shutdown. This is needed when you have /usr mounted on a separate partition.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et: