- Add a /lib/lsb/init-functions.d/ empty directory for this purpose.
- Add a lintian override for the above.
- Source any file in there.
- Document that in lsb-base.README.
(This would be used by systemd, at least).
Git-Dch: Full
function; the "pre" functions operate before any output, while the
"post" functions operate after the output is produced.
+HOOKING INIT-FUNCTIONS
+
+Since lsb-base 4.1+Debian3+, init-functions will source all files under
+/lib/lsb/init-functions.d for the purpose of allowing packages to alter
+or enhance the init-functions functions.
+
FANCY OUTPUT, KNOWN BUGS
* Daemons writing too much information on the screen (hence getting
--- /dev/null
+/lib/lsb/init-functions.d
--- /dev/null
+# This folder is meant for other packages' hooks.
+package-contains-empty-directory lib/lsb/init-functions.d/
FANCYTTY=
[ -e /etc/lsb-base-logging.sh ] && . /etc/lsb-base-logging.sh || true
+
+# Include hooks from other packages in /lib/lsb/init-functions.d
+for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null); do
+ [ -r $hook ] && . $hook || true
+done