From 5d05b06d0591c6df06b7a459e589011895b78114 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 26 Nov 2020 14:25:12 +0100 Subject: #1008 Add support to work with GPT tables WebConsole needs to rely on /shell/run to work with GPT tables. Because "Partition and Format"/"Particionar y Formatear" form always supposes that the partition table is MBR/MSDOS. "Setup"/"Configurar" script from "Cloning Engine" also supposes that the partition table is MBR/MSDOS. But it uses "Boot.lib" library, that can create MBR and GTP partitions. This commit: * Adds WebConsole support to work with GPT tables. - Adds input field where the user can select between MSDOS and GPT table types. * Adds "Setup" support to work with GPT tables. - Adds script parameter that expects a string with "MSDOS" or "GPT". --- admin/Interface/Configurar | 7 ++++--- admin/WebConsole/comandos/Configurar.php | 20 ++++++++++++++++++++ admin/WebConsole/comandos/jscripts/Configurar.js | 3 ++- admin/WebConsole/includes/restfunctions.php | 18 ++++++++++-------- 4 files changed, 36 insertions(+), 12 deletions(-) (limited to 'admin') diff --git a/admin/Interface/Configurar b/admin/Interface/Configurar index 3247d568..4ac760bc 100755 --- a/admin/Interface/Configurar +++ b/admin/Interface/Configurar @@ -32,10 +32,11 @@ PROG=$(basename $0) # @= caracter de separación #____________________________________________________________________ +tabletype=$1 + # Captura de parámetros (se ignora el 1er parámetro y se eliminan espacios y tabuladores). #param='dis=1*che=0*tch=70000000!par=1*cpt=NTFS*sfi=NTFS*tam=11000000*ope=0%' -shift -param="$(echo $* | sed 's/[ ]//g')" +param="$(echo $2 | sed 's/[ ]//g')" # Activa navegador para ver progreso coproc /opt/opengnsys/bin/browser -qws http://localhost/cgi-bin/httpd-log.sh @@ -103,7 +104,7 @@ ogDeletePartitionTable $dis ogExecAndLog COMMAND ogUpdatePartitionTable $dis # Crea tabla de particiones MSDOS (NOTA: adaptar para tablas GPT). -ogCreatePartitionTable $dis MSDOS +ogCreatePartitionTable "$dis" "$tabletype" # Inicia la cache. if echo "$sparam" |grep "CACHE" >/dev/null; then diff --git a/admin/WebConsole/comandos/Configurar.php b/admin/WebConsole/comandos/Configurar.php index 2ab5380c..cefc7990 100644 --- a/admin/WebConsole/comandos/Configurar.php +++ b/admin/WebConsole/comandos/Configurar.php @@ -124,6 +124,26 @@ if (isset($_POST["numdisk"])) $numdisk=$_POST["numdisk"]; texto = "SELECT codpar FROM ordenadores_particiones WHERE idordenador='" + .$idambito."' AND numdisk='".$numdisk."'"; + $rs->Comando = &$cmd; + if ($rs->Abrir()) { // Error al abrir recordset + $rs->Primero(); + if (!$rs->EOF){ + $current_table_type = $rs->campos["codpar"]; + } + $rs->Cerrar(); + } +?> +
+ Tabla de particiones: + +
+ $ips, + OG_REST_PARAM_TYPE => $table_type, OG_REST_PARAM_DISK => $disk, OG_REST_PARAM_CACHE => $cache, OG_REST_PARAM_CACHE_SIZE => $cache_size, -- cgit v1.2.3-18-g5258