aboutsummaryrefslogtreecommitdiff
path: root/rc.multi
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2009-08-25 12:57:02 +0200
committerThomas Bächler <thomas@archlinux.org>2009-08-25 12:57:02 +0200
commitcfabb85924f35c636550609b332d088aaae9941f (patch)
treedb508828fde2166a8accfd3251da461642812057 /rc.multi
parent76bb11cb8b5374ff2bba79afc80c408f61779f0c (diff)
downloadinitscripts-cfabb85924f35c636550609b332d088aaae9941f.tar.xz
Implement a hook-system that allows to add custom code to the initscripts at certain places
A function add_hook can be called from functions.d to register a hook function. The existing hooks are based on suggestions from Michael Towers (larch) and on the implementation of initscripts-extras-fbsplash which currently uses the strings passed to stat_busy and stat_done for this. More hooks can be added if requested. The implementation uses associative arrays and will thus only work with bash 4 or later
Diffstat (limited to 'rc.multi')
-rwxr-xr-xrc.multi4
1 files changed, 4 insertions, 0 deletions
diff --git a/rc.multi b/rc.multi
index 731e48e..0cddd1d 100755
--- a/rc.multi
+++ b/rc.multi
@@ -6,6 +6,8 @@
. /etc/rc.conf
. /etc/rc.d/functions
+run_hook start rc.multi
+
# Load sysctl variables if sysctl.conf is present
[ -r /etc/sysctl.conf ] && /sbin/sysctl -q -p &>/dev/null
@@ -24,4 +26,6 @@ if [ -x /etc/rc.local ]; then
/etc/rc.local
fi
+run_hook end rc.multi
+
# vim: set ts=2 noet: