X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2Fsuse-postun.sh;h=ac9f30c1eb836b38f2deee9eab3b428b0c8a2a4f;hb=fbf357543635d2fb9fa06f20e575e2d908d9d3c8;hp=44c87986513fac3dc59d6a367d89f883a8458fec;hpb=4add95c6b1b6570fd5e0c69cf7d5d70f14170057;p=fs%2Flustre-release.git diff --git a/build/suse-postun.sh b/build/suse-postun.sh index 44c8798..ac9f30c 100644 --- a/build/suse-postun.sh +++ b/build/suse-postun.sh @@ -45,6 +45,23 @@ if [ "$(readlink /boot/$image$SHORTNM)" = $image-%ver_str ]; then shopt -u nullglob fi +# remove the bootloader entry for the kernel being removed +if [ -x /usr/lib/bootloader/bootloader_entry ]; then + # handle 10.2 and SLES10 SP1 + /usr/lib/bootloader/bootloader_entry \ + remove \ + smp \ + %ver_str \ + vmlinuz-%ver_str \ + initrd-%ver_str +elif [ -x /sbin/update-bootloader ]; then + # handle 10.1 and SLES10 GA + /sbin/update-bootloader --image /boot/vmlinuz-%ver_str \ + --initrd /boot/initrd-%ver_str \ + --remove --force + /sbin/update-bootloader --refresh +fi + # Check whether there is a .previous link to the image we're about # to remove or to the image we point the new symlink to (so .previous # would be identical to the current symlink)