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/WebConsole/includes/restfunctions.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'admin/WebConsole/includes') diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index 13f6e3a7..8d8bf931 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -542,24 +542,26 @@ function setup($string_ips, $params) { $params, $matches); $ips = explode(';',$string_ips); - $disk = $matches[0][0]; - $cache = $matches[0][2]; - $cache_size = $matches[0][3]; + $table_type= $matches[0][0]; + $disk = $matches[0][1]; + $cache = $matches[0][3]; + $cache_size = $matches[0][4]; $partition_number = array(); $partition_code = array(); $file_system = array(); $part_size = array(); $format = array(); for ($x = 0; $x < 4; $x++) { - $partition_number[$x] = $matches[0][4 + 5 * $x]; - $partition_code[$x] = $matches[0][5 + 5 * $x]; - $file_system[$x] = $matches[0][6 + 5 * $x]; - $part_size[$x] = $matches[0][7 + 5 * $x]; - $format[$x] = $matches[0][8 + 5 * $x]; + $partition_number[$x] = $matches[0][5 + 5 * $x]; + $partition_code[$x] = $matches[0][6 + 5 * $x]; + $file_system[$x] = $matches[0][7 + 5 * $x]; + $part_size[$x] = $matches[0][8 + 5 * $x]; + $format[$x] = $matches[0][9 + 5 * $x]; } $data = array( OG_REST_PARAM_CLIENTS => $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