diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-22 12:55:16 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-22 12:58:15 +0000 |
commit | 934550384dbf3e9fe3502bd4dfa4ae06857a4912 (patch) | |
tree | 7400e0c5645ca3e05570921e8314d209b8022216 /main/syslinux/update-extlinux | |
parent | b69a9413143a4a960b07c8b798c677a52c0c0699 (diff) | |
download | aports-934550384dbf3e9fe3502bd4dfa4ae06857a4912.tar.bz2 aports-934550384dbf3e9fe3502bd4dfa4ae06857a4912.tar.xz |
main/syslinux: update-extlinux detect kernel labels as 'grsec'
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." |