summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--50-mkinitcpio.install12
-rw-r--r--Makefile3
2 files changed, 15 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:
diff --git a/Makefile b/Makefile
index 633dd63..1b933c9 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ DIRS = \
/usr/lib/initcpio/hooks \
/usr/lib/initcpio/install \
/usr/lib/initcpio/udev \
+ /usr/lib/kernel/install.d \
/usr/share/man/man8 \
/usr/share/man/man5 \
/usr/share/man/man1 \
@@ -48,6 +49,8 @@ install: all
cp -at $(DESTDIR)/usr/lib/initcpio hooks install
install -m644 -t $(DESTDIR)/usr/share/mkinitcpio mkinitcpio.d/*
+ install -m755 50-mkinitcpio.install $(DESTDIR)/usr/lib/kernel/install.d/50-mkinitcpio.install
+
install -m644 man/mkinitcpio.8 $(DESTDIR)/usr/share/man/man8/mkinitcpio.8
install -m644 man/mkinitcpio.conf.5 $(DESTDIR)/usr/share/man/man5/mkinitcpio.conf.5
install -m644 man/lsinitcpio.1 $(DESTDIR)/usr/share/man/man1/lsinitcpio.1