summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bbdb678)
raw | patch | inline | side by side (parent: bbdb678)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Aug 2009 14:48:45 +0000 (14:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Aug 2009 14:48:45 +0000 (14:48 +0000) |
-We are now able to remove partitions again.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14007 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14007 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc | patch | blob | history | |
gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc
index 77a6adc0a2116af85414a1edde3dab8ece1473d8..9d38144207164877530b58a350150487a49293b3 100644 (file)
$this->old_cn = $disk['cn'];
// Load partition info
- foreach($disk['partitions'] as $name => $values){
+ foreach($disk['partitions'] as $values){
+
+ $name = $values['FAIpartitionNr'];
// Do not load removed partitions
if($values['status'] == "delete"){
* And prepare names and numbers.
*/
foreach($this->partitions as $key=>$val) {
+ if($val['status'] == "delete") continue;
$this->partitions[$key]['FAIpartitionNr']=$key;
if($this->FAIdiskType == "disk"){
$this->partitions[$key]['cn'] = $this->DISKcn.$key;
}
}
- /* Attach deleted.
- */
- foreach($this->deletePartitions as $key=>$val) {
- $this->partitions[$key."-delete"]=$val;
- $this->partitions[$key."-delete"]['status']="delete";
- }
-
$tmp['description'] = $this->DISKdescription;
$tmp['partitions'] = $this->partitions;
$tmp['status'] = $this->status;
$tmp['FAIdiskOption'][] = "preserve_reinstall:".trim($preserve_reinstall,",");
}
+ /* Attach deleted.
+ */
+ foreach($this->deletePartitions as $val) {
+ $key = $val['FAIpartitionNr'];
+ $this->partitions[$key."-delete"]=$val;
+ $this->partitions[$key."-delete"]['status']="delete";
+ }
+
$tmp['status'] = $this->status;
return($tmp);
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index 93f486090c4d9c45aa4babf012f9ae50d036dbd5..8bcebec847a14fb465174dbd293e7b470a9c9232 100644 (file)
/* Important, mark all edited devices for removal.
* If the partition number changes we do not have the object twice.
*/
- if($part['status'] == "edited"){
+ if($part['status'] != "new"){
$part['status'] = "delete";
$newSetup[$partid] = $part;
}