Commit 7b63c05b37574ea4e095faa3699852a9c324ec30

Authored by Silvan Calarco
1 parent 833f6c8925
Exists in master and in 1 other branch milestone2

installer.kmdr: fix MBR changed check after gparted

installer.sh: fix not-running kernel removal

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

installer/installer.kmdr
... ... @@ -1478,6 +1478,7 @@
1478 1478  
1479 1479 devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r`
1480 1480 for device in $devices; do
  1481 + [ "$device:0:2" = "sd" -o "$device:0:2" = "hd" ] || continue
1481 1482 native_path=`get_udisks_key $device native-path`
1482 1483 [ -e $native_path/partition ] && continue
1483 1484 partscheme=`get_udisks_key $device scheme`
installer/installer.sh
... ... @@ -404,6 +404,16 @@
404 404 } || MKINITRAMFS_ADD=""
405 405 fi
406 406  
  407 +# remove not-running installed kernel
  408 +RUNNING_KERNEL=`uname -r | sed "s|[0-9.]*||"`
  409 +for i in `ls $MOUNTPOINT/boot/vmlinuz-*`; do
  410 + INSTALLED_KERNEL=`echo ${i} | sed "s|.*/vmlinuz-[0-9.]*||"`
  411 + [ "$INSTALLED_KERNEL" = "$RUNNING_KERNEL" ] && continue
  412 + dcop_write $"Removing ""$INSTALLED_KERNEL kernel..." 74
  413 + echo $"Removing ""$INSTALLED_KERNEL kernel..."
  414 + chroot $MOUNTPOINT smart remove -y kernel-$INSTALLED_KERNEL
  415 +done
  416 +
407 417 dcop_write $"Creating initramfs..." 75
408 418 echo $"Creating initramfs"
409 419 chroot $MOUNTPOINT \
... ... @@ -606,15 +616,6 @@
606 616 # remove unnecessary files and packages for fixed disk install
607 617 rpm -r $MOUNTPOINT -e livecd-tools
608 618 [ "$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 619  
619 620 sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc0.d/K99halt
620 621 sed -i /eject_cd.sh/d $MOUNTPOINT/etc/rc6.d/K99reboot