Only enable WinPE boot entries if necessary

* Addresses issue #94
This commit is contained in:
2Shirt 2019-03-11 22:31:56 -06:00
parent 459f95394a
commit 3fa6521c51
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
4 changed files with 11 additions and 9 deletions

View file

@ -573,9 +573,7 @@ w_sources="$(find /mnt/WinPE -iwholename "/mnt/WinPE/sources")"
echo "Copying Linux files..."
rsync ${RSYNC_ARGS} /mnt/Linux/* /mnt/Dest/ >> "${LOG_FILE}" 2>&1
sed -i "s/${ISO_LABEL}/${UFD_LABEL}/" /mnt/Dest/EFI/boot/refind.conf
sed -i "s/#UFD#//" /mnt/Dest/EFI/boot/refind.conf
sed -i "s/${ISO_LABEL}/${UFD_LABEL}/" /mnt/Dest/arch/boot/syslinux/*cfg
sed -i "s/#UFD#//" /mnt/Dest/arch/boot/syslinux/*cfg
echo "Copying WinPE files..."
if [[ ! -z "${arg_w:-}" ]]; then
@ -591,6 +589,10 @@ if [[ ! -z "${arg_w:-}" ]]; then
rsync ${RSYNC_ARGS} \
"${w_boot_bcd}" "${w_boot_sdi}" "${w_bootmgr}" "${w_sources}"/* \
/mnt/Dest/sources/ >> "${LOG_FILE}" 2>&1
# Uncomment boot entries
sed -i "s/#UFD-WINPE#//" /mnt/Dest/EFI/boot/refind.conf
sed -i "s/#UFD-WINPE#//" /mnt/Dest/arch/boot/syslinux/*cfg
fi
echo "Copying Main Kit..."

View file

@ -33,8 +33,8 @@ menuentry "Linux" {
add_options "loglevel=4 nomodeset nox"
}
}
#UFD#menuentry "WindowsPE" {
#UFD# ostype windows
#UFD# icon /EFI/boot/icons/wk_win.png
#UFD# loader /EFI/microsoft/bootx64.efi
#UFD#}
#UFD-WINPE#menuentry "WindowsPE" {
#UFD-WINPE# ostype windows
#UFD-WINPE# icon /EFI/boot/icons/wk_win.png
#UFD-WINPE# loader /EFI/microsoft/bootx64.efi
#UFD-WINPE#}

View file

@ -2,7 +2,7 @@ INCLUDE boot/syslinux/wk_head.cfg
MENU BACKGROUND pxelinux.png
INCLUDE boot/syslinux/wk_pxe_linux.cfg
#UFD#INCLUDE boot/syslinux/wk_pxe_winpe.cfg
#UFD-WINPE#INCLUDE boot/syslinux/wk_pxe_winpe.cfg
#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg
INCLUDE boot/syslinux/wk_tail.cfg

View file

@ -1,7 +1,7 @@
INCLUDE boot/syslinux/wk_head.cfg
INCLUDE boot/syslinux/wk_sys_linux.cfg
#UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg
#UFD-WINPE#INCLUDE boot/syslinux/wk_sys_winpe.cfg
#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg
INCLUDE boot/syslinux/wk_tail.cfg