From 66dad5f5b8798480fd9859c3d28ad7a3a132ec96 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 21 Jul 2021 17:36:27 +0200 Subject: #1048: Fix TFTPBOOT directory hardcoded in Advanced Netboot form. --- admin/WebConsole/principal/boot_grub4dos.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'admin') diff --git a/admin/WebConsole/principal/boot_grub4dos.php b/admin/WebConsole/principal/boot_grub4dos.php index fb271a1c..944f2801 100644 --- a/admin/WebConsole/principal/boot_grub4dos.php +++ b/admin/WebConsole/principal/boot_grub4dos.php @@ -3,10 +3,10 @@ // Autor: Irina Gomez - ETSII Universidad de Sevilla. // Fecha: 2019/02/12 -include_once("../includes/ctrlacc.php"); -include_once("../clases/AdoPhp.php"); -include_once("../includes/CreaComando.php"); -include_once("../idiomas/php/".$idioma."/boot_grub4dos_".$idioma.".php"); +include_once(__DIR__."/../includes/ctrlacc.php"); +include_once(__DIR__."/../clases/AdoPhp.php"); +include_once(__DIR__."/../includes/CreaComando.php"); +include_once(__DIR__."/../idiomas/php/".$idioma."/boot_grub4dos_".$idioma.".php"); $cmd=CreaComando($cadenaconexion); if (!$cmd) @@ -42,12 +42,13 @@ switch($litambito){ // /var/lib/tftboot/menu.lst/templates y /var/lib/tftpboot/grub/templates/ //######################################################################### // Leer nombres de ficheros plantillas bios -$dirtemplatesbios="/var/lib/tftpboot/menu.lst/templates/"; +const TFTPBOOT_DIR = "/opt/opengnsys/tftpboot"; +$dirtemplatesbios=TFTPBOOT_DIR."/menu.lst/templates/"; chdir($dirtemplatesbios); $pnbios=glob("*"); // Leer nombres de ficheros plantillas uefi -$dirtemplatesuefi="/var/lib/tftpboot/grub/templates/"; +$dirtemplatesuefi=TFTPBOOT_DIR."/grub/templates/"; chdir($dirtemplatesuefi); $pnuefi=glob("*"); -- cgit v1.2.3-18-g5258