summaryrefslogtreecommitdiffstats
path: root/kernel/update_kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/update_kernel')
-rwxr-xr-xkernel/update_kernel22
1 files changed, 15 insertions, 7 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel
index d17f51456..80235b823 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -97,8 +97,9 @@ function install_kernel() {
if [ -n "$2" ]; then
[ -d $ALL_KERNELS/$ver ] && return
main_ver=$2
- echo Removing previous kernel $ALL_KERNELS/$main_ver*
- rm -rf $ALL_KERNELS/$main_ver*
+ main_boot=$3
+ echo Removing previous kernel $ALL_KERNELS/$main_ver*$main_boot*
+ rm -rf $ALL_KERNELS/$main_ver*$main_boot*
fi
rm -rf $ALL_KERNELS/$ver
@@ -131,16 +132,23 @@ if [ -n "$1" ]; then
#- allow specifying a kernel file on commandline (./update_kernel /RPMS/kernel-2.4.22.10mdk-1-1mdk.i586.rpm)
install_kernel $1
else
- install_kernel $RPMS/kernel-BOOT-2.4*.rpm 2.4
- install_kernel $RPMS/kernel-BOOT-2.6*.rpm 2.6
+ #- install a normal kernel, place it first so that it doesn't get removed in -BOOT kernel install
+ install_kernel $RPMS/kernel-2.6*.rpm 2.6
+ install_kernel $RPMS/kernel-BOOT-2.4*.rpm 2.4 BOOT
+ install_kernel $RPMS/kernel-BOOT-2.6*.rpm 2.6 BOOT
fi
[ -n "$main" -a -e $ALL_KERNELS/$main ] || {
cd $ALL_KERNELS
- main=$(echo 2.6* | sed 's/.* //')
- [ -n "$main" ] || main=$(echo 2.4* | sed 's/.* //')
- echo "Choosing $main"
+ main=$(echo 2.6*BOOT* | sed 's/.* //')
+ [ -n "$main" ] || main=$(echo 2.4*BOOT* | sed 's/.* //')
+ echo "Choosing $main as BOOT kernel"
echo $main > .main
+ main_isolinux=$(ls -d1 2.6*|grep -v BOOT|sed -e 's,/*$,,')
+ if [ "$ARCH" == "i386" ] || [ "$ARCH" == "x86_64" ]; then
+ echo "Choosing $main_isolinux as full featured kernel for isolinux"
+ echo $main_isolinux > .isolinux
+ fi
cd ..
}