Commit 883b67fea78d46d02365e68651653cc1b3df9d6b

Authored by Silvan Calarco
1 parent 546cef13da
Exists in master and in 1 other branch milestone2

installer.sh: added code to remove not-running kernel at the end of installation…

…, to support mamba/mamba-64GB livedvd

Showing 2 changed files with 11 additions and 1 deletions Side-by-side Diff

1   -VERSION=2.4.95
  1 +VERSION=2.4.96
installer/installer.sh
... ... @@ -606,6 +606,16 @@
606 606 # remove unnecessary files and packages for fixed disk install
607 607 rpm -r $MOUNTPOINT -e livecd-tools
608 608 [ "$INSTALL_STABLE_UPDATES" = "1" ] && rpm -r $MOUNTPOINT -e openmamba-devel 2>/dev/null
  609 +
  610 +# remove not-running installed kernel
  611 +RUNNING_KERNEL=`uname -r`
  612 +for i in `ls $MOUNTPOINT/boot/vmlinuz-*`; do
  613 + INSTALLED_KERNEL=${i/*-}
  614 + [ "$INSTALLED_KERNEL" = "$RUNNING_KERNEL" ] && continue
  615 + chroot $MOUNTPOINT smart remove kernel-$INSTALLED_KERNEL
  616 + rm -f $MOUNTPOINT/boot/initramfs-$INSTALLED_KERNEL.img*
  617 +done
  618 +
609 619 sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc0.d/K99halt
610 620 sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc6.d/K99reboot
611 621