refs #329 adds function to mount NFS and compile ipxe

pull/1/head
Luis Gerardo Romero Garcia 2024-04-23 13:19:15 +02:00
parent a7604c00bd
commit 3a63a96238
1 changed files with 50 additions and 1 deletions

View File

@ -54,6 +54,49 @@ function add_tftpboot_files() {
} }
# Definir la función
mount_NFS() {
if sudo mount -t nfs ognartefactos.evlt.uma.es:/ /mnt; then
echo "Sistema NFS montado correctamente."
else
echo "Error: No se pudo montar el sistema NFS."
exit 1
fi
ls /mnt/
sudo cp -r /mnt/srv/artefactos/ipxe/ /tmp
cd /tmp/ipxe/src
if sudo make -j 4; then
echo "Directorio /tmp/ipxe/src montado correctamente."
else
echo "Error: No se pudo montar el directorio /tmp/ipxe/src."
exit 1
fi
if sudo make bin/undionly.kpxe EMBED=/opt/opengnsys/tftpboot/ipxe_scripts/dhcp_boot.ipxe; then
echo "Fichero de arranque montado correctamente."
else
echo "Error: No se pudo montar el fichero de arranque."
exit 1
fi
sudo cp bin/undionly.kpxe /opt/opengnsys/tftpboot
if sudo make bin-i386-pcbios/ipxe.efi EMBED=/opt/opengnsys/tftpboot/ipxe_scripts/dhcp_boot.ipxe; then
echo "Fichero EFI construido correctamente."
else
echo "Error: No se pudo construir el fichero EFI."
exit 1
fi
sudo cp bin-i386-pcbios/ipxe.efi /opt/opengnsys/tftpboot
}
downloadCode $GIT_REPO downloadCode $GIT_REPO
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error while getting code from the repository" echo "Error while getting code from the repository"
@ -64,4 +107,10 @@ add_tftpboot_files
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error añadiendo ficheros" echo "Error añadiendo ficheros"
exit 1 exit 1
fi fi
mount_NFS
if [ $? -ne 0 ]; then
echo "Error en el montaje NFS"
exit 1
fi