summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel <g2p.code@gmail.com>2013-10-18 16:21:45 +0200
committerGabriel <g2p.code@gmail.com>2013-10-18 16:24:33 +0200
commit2616293e73ac188fc53f744353bea1f4890b0a10 (patch)
tree4af82c63ff988525663ab407de7f8fe7d6930133
parent819eb356953625964d34e05c28ed9b87b72108b4 (diff)
Add a mkinitcpio hook
Taken from the Arch Linux wiki, with some paths updated. Untested.
-rw-r--r--Makefile1
-rwxr-xr-xinitcpio/install14
2 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d7f2f99..8e38d9a 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ install: make-bcache probe-bcache bcache-super-show
$(INSTALL) -m0644 69-bcache.rules $(DESTDIR)$(UDEVLIBDIR)/rules.d/
$(INSTALL) -m0644 -- *.8 $(DESTDIR)${PREFIX}/share/man/man8/
$(INSTALL) -D -m0755 initramfs/hook $(DESTDIR)/usr/share/initramfs-tools/hooks/bcache
+ $(INSTALL) -D -m0755 initcpio/install $(DESTDIR)/usr/lib/initcpio/install/bcache
$(INSTALL) -D -m0755 dracut/module-setup.sh $(DESTDIR)$(DRACUTLIBDIR)/modules.d/90bcache/module-setup.sh
# $(INSTALL) -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/
diff --git a/initcpio/install b/initcpio/install
new file mode 100755
index 0000000..72d4231
--- /dev/null
+++ b/initcpio/install
@@ -0,0 +1,14 @@
+#!/bin/bash
+build() {
+ add_module bcache
+ add_binary /usr/lib/udev/bcache-register
+ add_binary /usr/lib/udev/probe-bcache
+ add_file /usr/lib/udev/rules.d/69-bcache.rules
+}
+help() {
+ cat <<HELPEOF
+This hook will auto-assemble bcache devices.
+Requires the udev hook.
+HELPEOF
+}
+