From 8dbd4a2a1145ceebd9fe00322ced1a3b11fa7fd4 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Wed, 26 Jul 2006 15:36:34 +0000 Subject: [PATCH] Stefan Fiedler: target/bootdisk/build_stage1.sh: fix for kernels without modules [2006071817223820666] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7746 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- target/bootdisk/build_stage1.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/bootdisk/build_stage1.sh b/target/bootdisk/build_stage1.sh index 67725167e..265a03185 100644 --- a/target/bootdisk/build_stage1.sh +++ b/target/bootdisk/build_stage1.sh @@ -116,8 +116,15 @@ for x in modprobe.static modprobe.static.old insmod.static insmod.static.old ; d done echo_status "Copy scsi and network kernel modules." -( cd ../2nd_stage ; tar cf - lib/modules/*/kernel/drivers/{scsi,net} ) | tar xf - -find lib/modules -type f -exec $STRIP --strip-debug {} \; +tmptar="`mktemp`" ; tar cfT ${tmptar} /dev/null + +for x in $( cd ../2nd_stage ; ls -d lib/modules/*/kernel/drivers/{scsi,net} ) +do + [ -e "../2nd_stage/${x}" ] && tar rf ${tmptar} -C ../2nd_stage ${x} +done +tar xf ${tmptar} ; rm -f ${tmptar} + +[ -e lib/modules ] && find lib/modules -type f -exec $STRIP --strip-debug {} \; for x in ../2nd_stage/lib/modules/*/modules.{dep,pcimap,isapnpmap} ; do cp $x ${x#../2nd_stage/} || echo_status "not found: $x" ;