installer.sh: added code to remove not-running kernel at the end of installation, to support mamba/mamba-64GB livedvd

This commit is contained in:
Silvan Calarco 2011-10-06 16:49:53 +02:00
parent 546cef13da
commit 883b67fea7
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,3 @@
VERSION=2.4.95
VERSION=2.4.96

View File

@ -606,6 +606,16 @@ echo $"Removing/cleaning unnecessary files and packages"
# remove unnecessary files and packages for fixed disk install
rpm -r $MOUNTPOINT -e livecd-tools
[ "$INSTALL_STABLE_UPDATES" = "1" ] && rpm -r $MOUNTPOINT -e openmamba-devel 2>/dev/null
# remove not-running installed kernel
RUNNING_KERNEL=`uname -r`
for i in `ls $MOUNTPOINT/boot/vmlinuz-*`; do
INSTALLED_KERNEL=${i/*-}
[ "$INSTALLED_KERNEL" = "$RUNNING_KERNEL" ] && continue
chroot $MOUNTPOINT smart remove kernel-$INSTALLED_KERNEL
rm -f $MOUNTPOINT/boot/initramfs-$INSTALLED_KERNEL.img*
done
sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc0.d/K99halt
sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc6.d/K99reboot