aboutsummaryrefslogtreecommitdiffstats
path: root/main/syslinux/update-extlinux
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-22 12:55:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-22 12:58:15 +0000
commit934550384dbf3e9fe3502bd4dfa4ae06857a4912 (patch)
tree7400e0c5645ca3e05570921e8314d209b8022216 /main/syslinux/update-extlinux
parentb69a9413143a4a960b07c8b798c677a52c0c0699 (diff)
downloadaports-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-xmain/syslinux/update-extlinux13
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."