63 lines
1.6 KiB
INI
63 lines
1.6 KiB
INI
if [ x$net_efinet0_boot_file != x ]; then
|
|
set groupname=$net_efinet0_boot_file
|
|
elif [ x$net_efinet1_boot_file != x ]; then
|
|
set groupname=$net_efinet1_boot_file
|
|
elif [ x$net_efinet2_boot_file != x ]; then
|
|
set groupname=$net_efinet2_boot_file
|
|
elif [ x$net_pxe_boot_file != x ]; then
|
|
set groupname=$net_pxe_boot_file
|
|
else
|
|
set groupname=default
|
|
fi
|
|
# regexp -s 2:groupname (.*)/(.*)_(.*)_(.*) $net_pxe_boot_file
|
|
# regexp -s 3:architecture (.*)/(.*)_(.*)_(.*) $net_pxe_boot_file
|
|
# set fname=/grub/$groupname\_$architecture.cfg
|
|
# set arch_default=/grub/default_$architecture.cfg
|
|
|
|
export groupname
|
|
|
|
function load_video {
|
|
if [ x$feature_all_video_module = xy ]; then
|
|
insmod all_video
|
|
else
|
|
insmod efi_gop
|
|
insmod efi_uga
|
|
insmod ieee1275_fb
|
|
insmod vbe
|
|
insmod vga
|
|
insmod video_bochs
|
|
insmod video_cirrus
|
|
fi
|
|
}
|
|
|
|
|
|
#loadfont unicode
|
|
#load_video
|
|
#insmod gfxterm
|
|
#insmod gettext
|
|
#terminal_output gfxterm
|
|
#insmod png
|
|
#set color_highlight=white/red
|
|
#set color_normal=black/black
|
|
set menu_color_normal=white/black
|
|
set menu_color_highlight=white/cyan
|
|
if regexp ":" "${cmdpath}"; then
|
|
set root="http,{{ansible_default_ipv6.address}}"
|
|
set prefix="(http,{{ansible_default_ipv6.address}})/grub/"
|
|
set fname=/grub/configs/${net_default_ip}.cfg
|
|
else
|
|
set root="http,{{ansible_default_ipv4.address}}"
|
|
set prefix="(http,{{ansible_default_ipv4.address}})/grub/"
|
|
set fname=/grub/configs/${net_default_ip}.cfg
|
|
fi
|
|
|
|
set fname=/grub/by_mac/${net_default_mac}.cfg
|
|
if ! [ -s ${fname} ]; then
|
|
set fname=/grub/by_group/${groupname}.cfg
|
|
fi
|
|
|
|
if ! [ -s ${fname} ]; then
|
|
set fname=/grub/common/default.cfg
|
|
fi
|
|
|
|
configfile ${fname}
|