From 5a884d7cf51c20d79f9be88b93519e65b21cd41b Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 11 Jan 2008 16:03:15 +0000 Subject: * added hook mechanism to initramfs-init which can be used by plugins to trigger execution of their own script at a certain point in the initramfs-init execution path. This is not active yet * added basic implementation outline for Theme (a.k.a splash) plugin - unable to test anything, though, as VMware does not seem to provide a VESA framebuffer, so splashy won't run git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1466 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'initramfs/initrd-stuff/etc/functions') diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index e6c57d82..830e7008 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -552,6 +552,17 @@ echo "config completed" > /tmp/cfgcomplete fi } +############################################################################# +# execute all shell scripts in the given init-hook folder +runinithook () { +local hook=$1 +if [ -d /initramfs/init-hooks/$hook ]; then + for hook_script in /initramfs/init-hooks/$hook/*; do + . hook_script + done +fi +} + ############################################################################# # localization simply derived from $language variable set in machine-setup or # other sources - mostly taken from knoppix -- cgit v1.2.3-55-g7522