From 379e6441f9af24ce817cad7e433ce9a599c4188c Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Sat, 22 Mar 2008 12:07:20 +0000 Subject: initramfs-uniboot-1.0: only source existing files in load_modules * this avoids "/init: source: 64: Can't open /initrd.d/0*" for initramfs images built without the bootldr-buster module. --- packages/initrdscripts/files/init.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/initrdscripts/files/init.sh') diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh index 60d2e5da8b..cfac69b6d9 100644 --- a/packages/initrdscripts/files/init.sh +++ b/packages/initrdscripts/files/init.sh @@ -41,9 +41,11 @@ read_args() { load_modules() { for module in $MODULE_DIR/$1; do - # Cannot redir to $CONSOLE here easily - may not be set yet - echo "initramfs: Loading $module module" - source $module + if [ -e "$module" ]; then + # Cannot redir to $CONSOLE here easily - may not be set yet + echo "initramfs: Loading $module module" + source $module + fi done } -- cgit v1.2.3