summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-12-01 17:21:47 +0100
committerDave Reisner <dreisner@archlinux.org>2013-12-01 17:43:00 +0100
commit0ccd0bcf04496867c74f68ddb2de403c7d09c0bf (patch)
treeec07e51dc2147d2c60aed9c98dc5cef30ea2dcaf /Makefile
parentb8f596eee60bfec4efced5b2a448f1e4ca7ee189 (diff)
downloadmkinitcpio-0ccd0bcf04496867c74f68ddb2de403c7d09c0bf.tar.gz
mkinitcpio-0ccd0bcf04496867c74f68ddb2de403c7d09c0bf.tar.xz
Load build and run hooks from /etc/initcpio
This lets users shoot themselves in the foot more easily, as they can put their own modified hooks into /etc/initcpio/{hooks,install} to override those shipped by the distro in /usr/lib/initcpio. To make debugging easier, include the full path of the hook being used when mkinitcpio runs in verbose mode. Implements FS#37796.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 66b1960..801d4c7 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@ DIRS = \
/usr/share/bash-completion/completions \
/usr/share/zsh/site-functions \
/etc/mkinitcpio.d \
+ /etc/initcpio/hooks \
+ /etc/initcpio/install \
/usr/lib/initcpio/hooks \
/usr/lib/initcpio/install \
/usr/lib/initcpio/udev \
@@ -30,8 +32,8 @@ install: all
sed -e 's|^_f_config=.*|_f_config=/etc/mkinitcpio.conf|' \
-e 's|^_f_functions=.*|_f_functions=/usr/lib/initcpio/functions|' \
- -e 's|^_d_hooks=.*|_d_hooks=/usr/lib/initcpio/hooks:/lib/initcpio/hooks|' \
- -e 's|^_d_install=.*|_d_install=/usr/lib/initcpio/install:/lib/initcpio/install|' \
+ -e 's|^_d_hooks=.*|_d_hooks=/etc/initcpio/hooks:/usr/lib/initcpio/hooks:/lib/initcpio/hooks|' \
+ -e 's|^_d_install=.*|_d_install=/etc/initcpio/install:/usr/lib/initcpio/install:/lib/initcpio/install|' \
-e 's|^_d_presets=.*|_d_presets=/etc/mkinitcpio.d|' \
-e 's|%VERSION%|$(VERSION)|g' \
< mkinitcpio > $(DESTDIR)/usr/bin/mkinitcpio