initramfs-uniboot-1.0: only source existing files in load_modules
authorPhilipp Zabel <philipp.zabel@gmail.com>
Sat, 22 Mar 2008 12:07:20 +0000 (12:07 +0000)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Sat, 22 Mar 2008 12:07:20 +0000 (12:07 +0000)
* 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
packages/initrdscripts/initramfs-uniboot_1.0.bb

index 60d2e5d..cfac69b 100644 (file)
@@ -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
 }
 
index 403db0b..5a042ab 100644 (file)
@@ -1,5 +1,5 @@
 SRC_URI = "file://init.sh"
-PR = "r8"
+PR = "r9"
 DESCRIPTON = "A modular initramfs init script system."
 RRECOMMENDS = "kernel-module-mtdblock"