summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes/tftputils.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2018-01-19 08:21:20 +0000
committerramon <ramongomez@us.es>2018-01-19 08:21:20 +0000
commit7d8c1345a4535f9c3302385153ce0222c3b1b1a4 (patch)
tree890c51986ead8a4ae998db0c97d95d051f0d4e97 /admin/WebConsole/includes/tftputils.php
parent0c15976a440cfcc036bfb20bd14b7aad15db350d (diff)
#819: Borrar fichero PXE usando función de PHP en vez de comando de la ''shell''.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5560 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/includes/tftputils.php')
-rw-r--r--admin/WebConsole/includes/tftputils.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php
index 3c7370db..39673e26 100644
--- a/admin/WebConsole/includes/tftputils.php
+++ b/admin/WebConsole/includes/tftputils.php
@@ -185,10 +185,11 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
function deleteBootFile ($mac) {
// Obtener nombre de fichero a partir de dirección MAC.
- $pxedir="/opt/opengnsys/tftpboot/menu.lst";
+ $mac = strtoupper($mac);
+ $pxedir = "/opt/opengnsys/tftpboot/menu.lst";
$macfile = "$pxedir/01-" . substr($mac,0,2) . "-" . substr($mac,2,2) . "-" . substr($mac,4,2) . "-" . substr($mac,6,2) . "-" . substr($mac,8,2) . "-" . substr($mac,10,2);
// Eliminar el fichero.
- exec ("rm -f $macfile");
+ @unlink($macfile);
}
/**