From: hickert Date: Tue, 25 Mar 2008 07:07:22 +0000 (+0000) Subject: Updated Workstation Startup settings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ddc921fea45dcdd907f1a4f1a2436ae6dbebd6c1;p=gosa.git Updated Workstation Startup settings -Do not query SI server, if no si server is configured in the gosa.conf-iguration file. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9964 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 6f66628f2..f8b151beb 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -37,6 +37,7 @@ class workstartup extends plugin var $FAIclass = array(); // The currently selected classes var $FAIrelease = ""; var $FAIdebianMirror = "auto"; + var $si_active = FALSE; var $si_fai_action_failed = FALSE; var $cache = array(); // Used as cache in fai mehtods @@ -69,6 +70,9 @@ class workstartup extends plugin plugin::plugin ($config, $dn, $parent); + /* Check for si daemon */ + $this->si_active = isset($this->config->current['GOSA_SI']) && !empty($this->config->current['GOSA_SI']); + /* Check object group membership */ if(!isset($this->parent->by_object['ogroup'])){ $ldap = $this->config->get_ldap_link(); @@ -229,7 +233,7 @@ class workstartup extends plugin } - if($this->fai_activated && !$this->si_fai_action_failed){ + if($this->fai_activated && !$this->si_fai_action_failed && $this->si_active){ /* Check if the current mirror is available */ @@ -609,11 +613,11 @@ class workstartup extends plugin /* Create FAI output */ $this->update_fai_cache(); - if($this->si_fai_action_failed){ - $smarty->assign("si_fai_action_failed",$this->si_fai_action_failed); - }elseif($this->fai_activated){ + $smarty->assign("si_fai_action_failed",$this->si_fai_action_failed); + $smarty->assign("si_active",$this->si_active); + + if(!$this->si_fai_action_failed && $this->si_active && $this->fai_activated){ - $smarty->assign("si_fai_action_failed",$this->si_fai_action_failed); $smarty->assign("FAIservers" , $this->cache['SERVERS']); $smarty->assign("FAIdebianMirror",$this->FAIdebianMirror); $smarty->assign("FAIrelease" , $this->FAIrelease); @@ -893,7 +897,7 @@ class workstartup extends plugin /* Skip FAI attribute handling if not necessary */ - if($this->fai_activated && !$this->si_fai_action_failed){ + if($this->fai_activated && !$this->si_fai_action_failed && $this->si_active){ $ldap->cat($this->dn,array("FAIstate")); $checkFAIstate = $ldap->fetch(); @@ -1074,7 +1078,7 @@ class workstartup extends plugin { $force = FALSE; $this->si_fai_action_failed = FALSE; - + if(!$this->si_active) return; $start = microtime(TRUE); /* Get the list of available servers and their releases. diff --git a/gosa-plugins/goto/admin/systems/goto/workstationStartup.tpl b/gosa-plugins/goto/admin/systems/goto/workstationStartup.tpl index 2523fae7c..73d0a2f63 100644 --- a/gosa-plugins/goto/admin/systems/goto/workstationStartup.tpl +++ b/gosa-plugins/goto/admin/systems/goto/workstationStartup.tpl @@ -58,7 +58,10 @@ - {if $si_fai_action_failed} + {if !$si_active} + {t}GOsa support daemon not configured{/t}
+ {t}FAI settings cannot be modified{/t} + {elseif $si_fai_action_failed} {msgPool type=siError}
{t}Check if the GOsa support daemon (gosa-si) is running.{/t} {elseif $fai_activated}