close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
|
Last change
on this file since fa663a6 was
fa663a6,
checked in by Irina Gómez <irinagomez@…>, 7 years ago
|
|
#802 #888 Fix more error in 8c88e08
|
-
Property mode set to
100644
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | // Version 1.1.1 - Se utiliza el script setclientmode para crear los archivos PXE (ticket #802) |
|---|
| 3 | // Autor: Irina Gomez - ETSII Universidad de Sevilla |
|---|
| 4 | // Fecha: 2019/02/12 |
|---|
| 5 | |
|---|
| 6 | include_once("../includes/ctrlacc.php"); |
|---|
| 7 | |
|---|
| 8 | // Recogemos los parametros |
|---|
| 9 | $litambito=(isset($_REQUEST["litambito"])) ? $_REQUEST["litambito"] : ""; |
|---|
| 10 | $idambito=(isset($_REQUEST["idambito"])) ? $_REQUEST["idambito"] : ""; |
|---|
| 11 | $nombreambito=(isset($_REQUEST["nombreambito"])) ? $_REQUEST["nombreambito"] : ""; |
|---|
| 12 | |
|---|
| 13 | // Datos para el acceso a mysql |
|---|
| 14 | $strcn=explode(";",$cadenaconexion); |
|---|
| 15 | $file=tempnam("/tmp",".server.cnf."); |
|---|
| 16 | |
|---|
| 17 | $lista = explode(";",$_POST['listOfItems']); |
|---|
| 18 | foreach ($lista as $sublista) { |
|---|
| 19 | if (! empty ($sublista)) { |
|---|
| 20 | // Creo fichero con datos para mysql |
|---|
| 21 | $gestor=fopen($file, "w"); |
|---|
| 22 | fwrite($gestor, "USUARIO=".$strcn[1]."\nPASSWORD=".$strcn[2]."\n"); |
|---|
| 23 | fwrite($gestor, "datasource=".$strcn[0]."\nCATALOG=".$strcn[3]); |
|---|
| 24 | fclose($gestor); |
|---|
| 25 | |
|---|
| 26 | $elementos = explode("|",$sublista); |
|---|
| 27 | $hostname=$elementos[1]; |
|---|
| 28 | $optboot=$elementos[0]; |
|---|
| 29 | |
|---|
| 30 | // Llamamos al script setclientmode |
|---|
| 31 | shell_exec("/opt/opengnsys/bin/setclientmode $optboot $hostname PERM $file"); |
|---|
| 32 | unlink($file); |
|---|
| 33 | } |
|---|
| 34 | } |
|---|
| 35 | header("Location: ../principal/boot.php?idambito=". $idambito ."&nombreambito=" . $nombreambito . "&litambito=" . $litambito); |
|---|
| 36 | exit(); |
|---|
Note: See
TracBrowser
for help on using the repository browser.