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