summaryrefslogtreecommitdiffstats
path: root/main/syslinux/update-extlinux
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-06-30 12:51:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-30 12:53:03 +0000
commit1b50a0c4feb3bb6e080ccde6c962f116a7432d7d (patch)
tree2bf879d0a37c30026711fe3d3a361207e477cf33 /main/syslinux/update-extlinux
parent88b3c34113eb72af5c755395537cdc08e4fb9cf0 (diff)
downloadaports-1b50a0c4feb3bb6e080ccde6c962f116a7432d7d.tar.bz2
aports-1b50a0c4feb3bb6e080ccde6c962f116a7432d7d.tar.xz
main/syslinux: update-extlinux: autodetect poweroff.c32
and trivial fix for comment in conf
Diffstat (limited to 'main/syslinux/update-extlinux')
-rwxr-xr-xmain/syslinux/update-extlinux15
1 files changed, 9 insertions, 6 deletions
diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux
index 43a602ee0..26eb4c70b 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."