mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
minor tweaks to config parsing
This commit is contained in:
parent
efd662c63a
commit
1f8eaa696e
@ -13,7 +13,7 @@ reset_entry() {
|
||||
|
||||
echo_entry() {
|
||||
if [ "$kexectype" = "elf" ]; then
|
||||
if [ -z "$kernel" -o -z "$initrd" ]; then return; fi
|
||||
if [ -z "$kernel" ]; then return; fi
|
||||
|
||||
entry="$name|$kexectype|kernel $kernel|initrd $initrd"
|
||||
if [ -n "$append" ]; then entry="$entry|append $append"; fi
|
||||
@ -57,6 +57,9 @@ grub_entry() {
|
||||
kernel="$val"
|
||||
;;
|
||||
module*)
|
||||
case $val in
|
||||
--nounzip*) val=`echo $val | cut -d\ -f2-` ;;
|
||||
esac
|
||||
modules="$modules|module $val"
|
||||
;;
|
||||
linux*)
|
||||
@ -105,14 +108,17 @@ EOF
|
||||
}
|
||||
|
||||
syslinux_entry() {
|
||||
label_line=${line:0:5}
|
||||
if [ -z "$line" ]; then
|
||||
case $line in
|
||||
"")
|
||||
syslinux_end
|
||||
return
|
||||
;;
|
||||
label* | LABEL* )
|
||||
syslinux_end
|
||||
fi
|
||||
if [ "$label_line" = "label" -o "$label_line" = "LABEL" ]; then
|
||||
search_entry
|
||||
return
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# add info to menuentry
|
||||
trimcmd=`echo $line | tr '\t ' ' ' | tr -s ' '`
|
||||
|
Loading…
Reference in New Issue
Block a user