- for image in $(cd /boot ; ls -dt $image-*); do
- initrd=initrd-${image#*-}
- if [ -f /boot/$image -a -f /boot/$initrd ]; then
- relink $image /boot/${image%%%%-*}
- relink $initrd /boot/${initrd%%%%-*}
+ for img in $(cd /boot ; ls -dt $image-*$SHORTNM); do
+ initrd=initrd-${img#*-}
+ if [ -f /boot/$img -a -f /boot/$initrd ]; then
+ relink $img /boot/${img%%%%-*}$SHORTNM
+ relink $initrd /boot/${initrd%%%%-*}$SHORTNM
+
+ # Notify the boot loader that a new kernel image is active.
+ if [ -x /sbin/new-kernel-pkg ]; then
+ /sbin/new-kernel-pkg $(/sbin/get_kernel_version /boot/$img)
+ fi