refs #1167 #1168 #1169 #1170 put basename if i receive a directory in oglivedir and removes all ports in parameter kernel
parent
b798464c84
commit
8183050f7e
|
@ -1050,6 +1050,7 @@ public function createBootFile(Request $request): JsonResponse
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
// Parámetros opcionales
|
||||
$parameters = [
|
||||
'LANG' => $data['lang'] ?? 'es_ES.UTF-8',
|
||||
|
@ -1059,11 +1060,11 @@ public function createBootFile(Request $request): JsonResponse
|
|||
'computer_name' => $data['computer_name'] ?? '',
|
||||
'netiface' => $data['netiface'] ?? '',
|
||||
'group' => $data['group'] ?? '',
|
||||
'ogrepo' => $data['ogrepo'] ?? '',
|
||||
'ogcore' => $data['ogcore'] ?? '',
|
||||
'oglive' => $data['oglive'] ?? $serverIp,
|
||||
'oglog' => $data['oglog'] ?? $serverIp,
|
||||
'ogshare' => $data['ogshare'] ?? $serverIp,
|
||||
'ogrepo' => isset($data['ogrepo']) ? explode(':', $data['ogrepo'])[0] : '',
|
||||
'ogcore' => isset($data['ogcore']) ? explode(':', $data['ogcore'])[0] : '',
|
||||
'oglive' => isset($data['oglive']) ? explode(':', $data['oglive'])[0] : $serverIp,
|
||||
'oglog' => isset($data['oglog']) ? explode(':', $data['oglog'])[0] : $serverIp,
|
||||
'ogshare' => isset($data['ogshare']) ? explode(':', $data['ogshare'])[0] : $serverIp,
|
||||
'oglivedir' => $data['oglivedir'] ?? '',
|
||||
'ogprof' => $data['ogprof'] ?? 'false',
|
||||
'hardprofile' => $data['hardprofile'] ?? '',
|
||||
|
@ -1113,7 +1114,10 @@ public function createBootFile(Request $request): JsonResponse
|
|||
if (!empty($this->ogBootPort)) {
|
||||
$serverIpPort .= ':' . $this->ogBootPort;
|
||||
}
|
||||
|
||||
// Extraer solo el nombre del directorio si contiene una ruta completa PROVISIONAL
|
||||
if (strpos($ogLiveDir, '/') !== false) {
|
||||
$ogLiveDir = basename($ogLiveDir);
|
||||
}
|
||||
$pxeContent = str_replace(
|
||||
['__INFOHOST__', '__SERVERIP__', '__OGLIVE__'],
|
||||
[$kernelArgs, $serverIpPort, $ogLiveDir],
|
||||
|
|
Loading…
Reference in New Issue