From bbdb678d4b09639950002ca600caa09807712608 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 7 Aug 2009 14:23:22 +0000 Subject: [PATCH] Udpated FAI partition handling -Wome problems while resorting the partition numbers. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14006 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiPartitionTable.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index 7732843e3..93f486090 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -674,9 +674,16 @@ class faiPartitionTable extends plugin $logical[$partid] = $part; }else{ trigger_error("Fatal: unknown disk type? ".$part['FAIpartitionType']); - } + } + + /* Important, mark all edited devices for removal. + * If the partition number changes we do not have the object twice. + */ + if($part['status'] == "edited"){ + $part['status'] = "delete"; + $newSetup[$partid] = $part; + } } - $newSetup = array(); $cnt = 1; foreach($primary as $part){ $part['FAIpartitionNr'] = $cnt; -- 2.30.2