summaryrefslogtreecommitdiffstats
path: root/update_kernel
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-25 12:07:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-25 12:07:02 +0000
commit03bac75a8578f21eca244e7c4610c941aa99c8b0 (patch)
treec8c490e423735a2f7a1a52b5852c422ec7d16868 /update_kernel
parentdf5631d587066b6c768d3eb4466be9374f3f7cc1 (diff)
downloaddrakx-03bac75a8578f21eca244e7c4610c941aa99c8b0.tar
drakx-03bac75a8578f21eca244e7c4610c941aa99c8b0.tar.gz
drakx-03bac75a8578f21eca244e7c4610c941aa99c8b0.tar.bz2
drakx-03bac75a8578f21eca244e7c4610c941aa99c8b0.tar.xz
drakx-03bac75a8578f21eca244e7c4610c941aa99c8b0.zip
use latest /RPMS/kernel-BOOT-*.rpm (and some hacks to update tftpboot directory)
Diffstat (limited to 'update_kernel')
-rwxr-xr-xupdate_kernel34
1 files changed, 17 insertions, 17 deletions
diff --git a/update_kernel b/update_kernel
index 1aec043f2..2f93315dc 100755
--- a/update_kernel
+++ b/update_kernel
@@ -46,13 +46,28 @@ function create_modules() {
}
[ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main)
+
+rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-(.*)\.(.*)/$1-${2}BOOT/')
+if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then
+ rm -rf $ALL_KERNELS/$main
+ cd $ALL_KERNELS
+ rm -rf $rpm ; mkdir $rpm
+ cd $rpm
+ rpm2cpio /RPMS/kernel-BOOT-*.rpm | cpio -id
+ find -type f -name "*.o.gz" | xargs gunzip
+ cd ../..
+
+ for dir in /tftpboot /var/lib/tftpboot; do
+ rm -f $dir/{vmlinuz,network.rdz}
+ done
+fi
+
[ -n "$main" -a -e $ALL_KERNELS/$main ] || {
- pushd . >/dev/null
cd $ALL_KERNELS
main=$(echo 2.* | sed 's/.* //')
echo "Choosing $main"
echo $main > .main
- popd >/dev/null
+ cd ..
}
ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
@@ -114,18 +129,3 @@ for i in $ALL_KERNELS/*; do
fi
) || exit 1
done
-
-
-install_kernel() {
- v=2.4.17
- vr=8mdk
- rpm=kernel-BOOT-${v}.${vr}-1-1mdk.i586.rpm
- vv=${v}-${vr}BOOT
- rm -rf all.kernels/$(cat all.kernels/.main)
- (cd /tmp ; rm -f kernel-BOOT-* ; wget https://kenobi.mandrakesoft.com/~chmou/kernel/BOOT/$rpm)
- cd ~/gi/all.kernels ; rm -rf $vv ; mkdir $vv ; cd $vv ; rpm2cpio /tmp/$rpm | cpio -id
- cd ~/gi ; ./update_kernel ; rm -f images/network.rdz ; ./make_boot_img images/network.rdz network
- /bin/cp -f all.kernels/$vv/boot/vmlinu* /var/lib/tftpboot/vmlinuz
- /bin/cp -f images/network.rdz-$vv /var/lib/tftpboot/network.rdz
- /bin/cp -f ~/gi/all.modules/modules.cz-$vv /export/Mandrake/mdkinst/lib
-}