From: hickert Date: Tue, 17 May 2011 12:04:26 +0000 (+0000) Subject: Updated Device config, to use the correct config management method X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b07180376488250be6d89eb9b8313bb17dad8afc;p=gosa.git Updated Device config, to use the correct config management method git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20846 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl b/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl index ba2fa34ff..096d14cbe 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl +++ b/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl @@ -25,7 +25,7 @@ - {html_options options=$installConfigManagementList selected=$installConfigManagement} diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc index c77adbd33..208b7fa8c 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc @@ -89,9 +89,11 @@ class DeviceConfig extends plugin $smarty->assign("errorMsg", msgPool::rpcError($this->rpcErrorMessage)); return($display.$smarty->fetch(get_template_path('goto/Device/DeviceConfig.tpl', TRUE))); } - + + // Load assignable elements. - $assignableElements = $rpc->listAssignableElements('squeeze/1.0'); + $release = $this->parent->by_object['InstallRecipe']->installRelease; + $assignableElements = $rpc->listAssignableElements($release); if(!$rpc->success()){ $smarty = get_smarty(); $smarty->assign("error", TRUE); @@ -265,7 +267,9 @@ class DeviceConfig extends plugin // Save changes back to server. $rpc = $this->config->getRpcHandle(); - $rpc->systemSetConfigParameters($this->deviceUUID, array('method' => 'puppet', 'var' => $save, 'item' => $this->usedElements)); + $installConfigManagement = $this->parent->by_object['InstallRecipe']->installConfigManagement; + $rpc->systemSetConfigParameters($this->deviceUUID, array('method' => $installConfigManagement, + 'var' => $save, 'item' => $this->usedElements)); if(!$rpc->success()){ $this->rpcErrorMessage = $rpc->get_error(); msg_dialog::display(_("Error"), msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG); diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc index 7f8b7d67c..b5ccec7a2 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc @@ -152,6 +152,11 @@ class InstallRecipe extends plugin $this->installBootstrapMethod = $this->installationTemplates[$this->installTemplate]['method']; $this->reloadInstallationKernelPackages($initially); $this->reloadInstallationMirrors($initially); + + // Preset the config management method. + if(!isset($this->installConfigManagementList[$this->installBootstrapMethod][$this->installConfigManagement])){ + $this->installConfigManagement = key($this->installConfigManagementList[$this->installBootstrapMethod]); + } }