diff --git a/target/share/install/build_initrd.sh b/target/share/install/build_initrd.sh index 3d60be8..d7bb04b 100644 --- a/target/share/install/build_initrd.sh +++ b/target/share/install/build_initrd.sh @@ -3,7 +3,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: target/share/install/build_initrd.sh -# Copyright (C) 2006 The OpenSDE Project +# Copyright (C) 2006 - 2007 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. @@ -41,8 +41,14 @@ arch_boot_cd_pre $isofsdir for x in `egrep 'X .* KERNEL .*' $base/config/$config/packages | cut -d ' ' -f 5` ; do + if [ "$SDECFG_MULTILIB" != 1 ]; then + libdir=lib + else + libdir=lib64 + fi + kernel=${x/_*/} - moduledir="`grep lib/modules $build_root/var/adm/flists/$kernel | + moduledir="`grep $libdir/modules $build_root/var/adm/flists/$kernel | cut -d ' ' -f 2 | cut -d / -f 1-3 | uniq | head -n 1`" kernelver=${moduledir/*\/} initrd="initrd-$kernelver.img"