summaryrefslogtreecommitdiffstats
path: root/scripts/upd-kernel
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2008-04-10 14:09:15 +0100
committerJeremy Katz <katzj@redhat.com>2008-04-10 14:10:59 -0400
commit8d483c36d721432e247be6b0908584c730f70529 (patch)
tree89c647e123da80750cf2d153427d7b329738adec /scripts/upd-kernel
parent4f282584249c1fd8775876be7b702257cda34fe2 (diff)
downloadanaconda-8d483c36d721432e247be6b0908584c730f70529.tar.gz
anaconda-8d483c36d721432e247be6b0908584c730f70529.tar.xz
anaconda-8d483c36d721432e247be6b0908584c730f70529.zip
upd-kernel: Update to not use moduleball
We now just keep a tree of compressed modules rather than a moduleball, so handle updating that new format. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'scripts/upd-kernel')
-rwxr-xr-xscripts/upd-kernel23
1 files changed, 9 insertions, 14 deletions
diff --git a/scripts/upd-kernel b/scripts/upd-kernel
index 66f8da0a6..d728f7e46 100755
--- a/scripts/upd-kernel
+++ b/scripts/upd-kernel
@@ -57,23 +57,18 @@ popd
mkdir initrd
pushd initrd
zcat $OLDDIR/initrd.img |cpio -id
-popd
-mkdir initrd/modules/mods
-# explode the moduleball
-pushd initrd/modules/mods
-zcat ../modules.cgz |cpio -id
-popd
+for mod in $(find modules/ -type f -name '*.ko.gz' -exec basename {} \; | sort | uniq) ; do
+ for path in $(find $WORKDIR/rpm/lib/modules/$NEWVER/ -name ${mod%.gz}); do
+ dest=${path##$WORKDIR/rpm/lib/}
+ mkdir -p $(dirname $dest)
+ gzip < $path > $dest.gz
+ done
+done
-mkdir -p newmods/$NEWVER/$ARCH
-for i in $(find initrd/modules/mods -type f -name '*.ko' -exec basename {} \;); do find $WORKDIR/rpm/lib/modules/*/ -name $i -exec cp -v {} $WORKDIR/newmods/$NEWVER/$ARCH \; ; done
-rm -rf initrd/modules/mods
+/sbin/depmod -a -b . $NEWVER
+rm -f modules/$NEWVER/modules.*map
-pushd newmods
-find . |cpio --quiet -H crc -o |gzip -9 > $WORKDIR/initrd/modules/modules.cgz
-popd
-
-pushd initrd
find . |cpio -c -o |gzip -9 > $NEWDIR/initrd.img
popd