From 5e5538803735ced3b7ca9428cee8bd835b63a0af Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Wed, 3 Dec 2008 23:16:33 -0200 Subject: initramfs-uniboot: split load_modules to allow the module loading to be customized --- packages/initrdscripts/files/init.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'packages/initrdscripts/files') diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh index cfac69b6d9..5cdbab5e0d 100644 --- a/packages/initrdscripts/files/init.sh +++ b/packages/initrdscripts/files/init.sh @@ -39,13 +39,15 @@ read_args() { done } +load_module() { + # Cannot redir to $CONSOLE here easily - may not be set yet + echo "initramfs: Loading $module module" + source $1 +} + load_modules() { for module in $MODULE_DIR/$1; do - if [ -e "$module" ]; then - # Cannot redir to $CONSOLE here easily - may not be set yet - echo "initramfs: Loading $module module" - source $module - fi + [ -e "$module" ] && load_module $module done } -- cgit v1.2.3