diff options
Diffstat (limited to 'main/syslinux/update-extlinux')
-rwxr-xr-x | main/syslinux/update-extlinux | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index 8a26ffe6ca..2de06e259a 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -119,9 +119,12 @@ for kernel in $(find /boot -name vmlinuz-* -type f); do everbose "Found initramfs: /boot/initramfs-$tag" initramfs="initrd=initramfs-$tag" fi - - echo "LABEL $lst" >> $conf.new - if [ "$lst" = "$default" ]; then + label=$(grep -w -l $tag /usr/share/kernel/*/kernel.release | cut -d/ -f5) + if [ -z "$label" ]; then + label=$lst + fi + echo "LABEL $label" >> $conf.new + if [ "$label" = "$default" ]; then echo " MENU DEFAULT" >> $conf.new fi echo " MENU LABEL Linux $tag" >> $conf.new @@ -133,11 +136,11 @@ done if [ -f "/boot/memtest" ]; then everbose "Found memtest86+: /boot/memtest" - echo "LABEL $lst" >> $conf.new + echo "LABEL memtest" >> $conf.new echo " MENU LABEL Memtest86+" >> $conf.new echo " KERNEL memtest" >> $conf.new echo "" >> $conf.new - lst=$(($lst + 1)) + lst=$(($lst + 1)) fi everbose "$lst entries found." |