From 6bb491ce1c9b75be722160c83c054b9d84104d48 Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 25 Sep 2024 13:45:54 -0300 Subject: [PATCH] pxe: simplify and avoid error --- pxe/install-pxe.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pxe/install-pxe.sh b/pxe/install-pxe.sh index 8d7bf2d..5169e6a 100755 --- a/pxe/install-pxe.sh +++ b/pxe/install-pxe.sh @@ -53,12 +53,6 @@ tftp-root=${tftp_path} END } -extract_live_parts_for_tftp() { - cp -fv "${PXE_DIR}/../iso/staging/live/vmlinuz" "${tftp_path}/" - cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${tftp_path}/" - rsync -av "${PXE_DIR}/../iso/staging/live/filesystem.squashfs" "${nfs_path}/live/" -} - install_netboot() { # if you want to refresh install, remove or move dir if [ ! -d "${tftp_path}" ] || [ "${FORCE:-}" ]; then @@ -70,7 +64,10 @@ install_netboot() { rm -rf "${tftp_path}/pxelinux.cfg" mkdir -p "${tftp_path}/pxelinux.cfg" fi - extract_live_parts_for_tftp + + cp -fv "${PXE_DIR}/../iso/staging/live/vmlinuz" "${tftp_path}/" + cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${tftp_path}/" + rsync -av "${PXE_DIR}/../iso/staging/live/filesystem.squashfs" "${nfs_path}/live/" cat > "${tftp_path}/pxelinux.cfg/default" <