summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 076fa59)
raw | patch | inline | side by side (parent: 076fa59)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Oct 2010 13:53:06 +0000 (13:53 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Oct 2010 13:53:06 +0000 (13:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20084 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc | patch | blob | history |
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 353dec517d0afca2757f879838f69afff5b3d9cb..43a93b36d33600955870bd952f7f9fa519c990c2 100644 (file)
"installRootEnabled","installRootPasswordHash","installKernelPackage",
"installPartitionTable","installConfigManagement","installBootstrapMethod");
+ private $map = array('puppet' => array('objectClass' => 'puppetClient', 'type' => 'puppet', 'bootstrap' => 'preseed'));
/* Some plugin management related attributes
* See class plugin for details.
*/
function init()
{
+ // Detect account status by checking the used objectClasses
+ $this->is_account = FALSE;
+ foreach($this->map as $type){
+ if(in_array($type['objectClass'], $this->attrs['objectClass'])){
+ $this->installBootstrapMethod = $type['bootstrap'];
+ $this->installConfigManagement = $type['type'];
+ $this->is_account = TRUE;
+ }
+ }
+
// Start without error.
$this->initFailed = FALSE;
+
// Prepare list of timezones
$this->timezones = $this->getTimezones();
function save_object()
{
-
-
if(isset($_POST['InstallRecipePosted'])){
$currentInstallMethod = $this->installConfigManagement;
unset($this->attrs['installBootstrapMethod']);
echo "Skipp saving of 'installConfigManagement' and 'installBootstrapMethod', i've no idea where to store them.";
+ // Remove all objectClasses which belongs to a bootstrap method,
+ // and then add the selected one.
+ foreach($this->map as $type){
+ $this->attrs['objectClass'] = array_remove_entries_ics(array($type['objectClass']), $this->attrs['objectClass']);
+ }
+ $this->attrs['objectClass'][] = $this->map[$this->installConfigManagement]['objectClass'];
+
+ print_a($this->attrs);
+
$this->cleanup();
$ldap=$this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);