summaryrefslogtreecommitdiff
path: root/50-mkinitcpio.install
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-09-26 15:15:20 +0200
committerDave Reisner <dreisner@archlinux.org>2013-09-26 13:29:53 -0400
commit344c27a8b56a4aa8bd168f98285165c3fc87cba3 (patch)
tree418302b00acb9316fd6a5268b753bd5965342b2e /50-mkinitcpio.install
parent45f176893593aca61f2191b41b24971469f13fce (diff)
kernel-install: add hook
This will allow systemd's kernel-install script to generate and install an initrd as per the freedesktop boot loader specs. See kernel-install(8) for details. Notice that 'profiles' are not used. This will eventually be hooked up so that calling "make install" from a kernel build will do the right thing. Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to '50-mkinitcpio.install')
-rw-r--r--50-mkinitcpio.install12
1 files changed, 12 insertions, 0 deletions
diff --git a/50-mkinitcpio.install b/50-mkinitcpio.install
new file mode 100644
index 0000000..c8f51ba
--- /dev/null
+++ b/50-mkinitcpio.install
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+case $1 in
+ add)
+ mkinitcpio -k "$2" -g "$3"/initrd
+ ;;
+ remove)
+ rm -f -- "$3"/initrd
+ ;;
+esac
+
+# vim: set ft=sh ts=4 sw=4 et: