Code

Udpated FAI partition handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Aug 2009 14:23:22 +0000 (14:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Aug 2009 14:23:22 +0000 (14:23 +0000)
-Wome problems while resorting the partition numbers.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14006 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc

index 7732843e3cfaa721d695871716d40c06bd7d4668..93f486090c4d9c45aa4babf012f9ae50d036dbd5 100644 (file)
@@ -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;