summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes/tftputils.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-06-02 07:40:35 +0000
committerramon <ramongomez@us.es>2017-06-02 07:40:35 +0000
commitccda415f8b9492b440f6a77d54a09983c549b629 (patch)
tree7b83766756d134eea9da48bc006e1b60ab1fdccf /admin/WebConsole/includes/tftputils.php
parentc311ef2f23332a9aff1a6f8a2ecd8ebd20be2190 (diff)
#768: Incluir directorio de ogLive al generar fichero PXE.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5333 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/includes/tftputils.php')
-rw-r--r--admin/WebConsole/includes/tftputils.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php
index f216f4e0..568854b6 100644
--- a/admin/WebConsole/includes/tftputils.php
+++ b/admin/WebConsole/includes/tftputils.php
@@ -75,6 +75,7 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
// Obtener información de la base de datos.
$cmd->texto="SELECT ordenadores.nombreordenador AS hostname, ordenadores.ip AS ip,
ordenadores.mac AS mac, ordenadores.netiface AS netiface,
+ ordenadores.oglivedir AS oglivedir,
aulas.netmask AS netmask, aulas.router AS router,
aulas.ntp AS ntp, aulas.dns AS dns, aulas.proxy AS proxy,
aulas.nombreaula AS grupo, repositorios.ip AS iprepo,
@@ -108,6 +109,7 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
$server=$rs->campos["ipserveradm"];
$vga=$rs->campos["vga"];
$winboot=$rs->campos["winboot"];
+ $oglivedir=$rs->campos["oglivedir"];
$ogunit=$rs->campos["ogunit"];
if ($ogunit == 0 or $rs->campos["directorio"] == null) {
$directorio="" ;
@@ -137,7 +139,8 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
" ogrepo=$repo" .
" oglive=$server" .
" oglog=$server" .
- " ogshare=$server";
+ " ogshare=$server" .
+ " oglivedir=$oglivedir";
// Añadir parámetros opcionales.
if (! empty ($ntp)) { $infohost.=" ogntp=$ntp"; }
if (! empty ($dns)) { $infohost.=" ogdns=$dns"; }
@@ -165,7 +168,7 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
exec ("sed -e 's|vga=...||g' -e 's|INFOHOST|$infohost|g' $pxedir/templates/$bootopt > $macfile");
}
else{
- exec ("sed -e 's|INFOHOST|$infohost|g' $pxedir/templates/$bootopt > $macfile");
+ exec ("sed -e 's|INFOHOST|$infohost|g' -e 's|set ISODIR=.*|set ISODIR=$oglivedir|g' $pxedir/templates/$bootopt > $macfile");
}
exec ("chmod 777 $macfile");
}