summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-11 19:10:31 +0200
committerDave Reisner <dreisner@archlinux.org>2012-05-18 15:39:04 +0200
commit261b731e8fb918309f2740b5262d9678378491fa (patch)
treeb228794c61cfb1745050557e2334b47fc1eb21bf /mkinitcpio
parent01cb8b7a20ab53967a68e56a64152c357e12ff41 (diff)
downloadmkinitcpio-261b731e8fb918309f2740b5262d9678378491fa.tar.gz
mkinitcpio-261b731e8fb918309f2740b5262d9678378491fa.tar.xz
functions: introduce add_runscript
This function adds a runtime script to the /hooks directory on the initramfs image. Note that this function will also install hooks with executable permissions for use by a later change to early init. With this commit, there are now methods available which can be used in place of the MODULES, FILES, BINARIES, and SCRIPT variables, as we now offer error checking on the add_* functions. Usage of the variables is deprecated, and these will no longer be read in a future version of mkinitcpio. This commit also lays the groundwork for the addition of more early userspace hooks. Runtime hook files are parsed for specific functions and variables (not yet used) are populated. These will eventually be written to the image config so that early userspace knows exactly what to run. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio1
1 files changed, 1 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 0cf17fb..e346169 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -26,6 +26,7 @@ declare MODULE_FILE= GENIMG= PRESET= COMPRESSION_OPTIONS= BUILDROOT=
declare NC= BOLD= BLUE= GREEN= RED= YELLOW=
declare -i QUIET=1 SHOW_AUTOMODS=0 SAVELIST=0 COLOR=1
declare -a SKIPHOOKS ADDED_MODULES MODPATHS
+declare -A RUNHOOKS
# export a sane PATH
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'