From 1b50a0c4feb3bb6e080ccde6c962f116a7432d7d Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Sun, 30 Jun 2013 12:51:54 +0000 Subject: main/syslinux: update-extlinux: autodetect poweroff.c32 and trivial fix for comment in conf --- main/syslinux/update-extlinux | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'main/syslinux/update-extlinux') diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index 43a602ee09..26eb4c70b7 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -171,13 +171,16 @@ elif [ -f "/boot/memtest" ]; then echo "" >> $conf.new fi -if [ -f "/boot/reboot.c32" ]; then - everbose "Found reboot" - echo "LABEL reboot" >> $conf.new - echo " MENU LABEL Reboot" >> $conf.new - echo " COM32 reboot.c32" >> $conf.new +for i in reboot poweroff; do + [ -f "/boot/$i.c32" ] || continue + everbose "Found $i" + # make first char capital + cap=$( echo $i | awk '{sub(".", substr(toupper($0),1,1), $0); print}' ) + echo "LABEL $i" >> $conf.new + echo " MENU LABEL $cap" >> $conf.new + echo " COM32 $i.c32" >> $conf.new echo "" >> $conf.new -fi +done if cmp -s $conf.new $conf; then everbose "Configuration unchanged." -- cgit v1.2.3