Code

Updated work startup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Mar 2008 09:19:03 +0000 (09:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Mar 2008 09:19:03 +0000 (09:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9953 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
gosa-plugins/goto/admin/systems/goto/workstationStartup.tpl

index 5485aaafb4550816e3d6976513b4ec7395c22b56..c7812ae58e10707f897ec59846970a666c8ea6b4 100644 (file)
@@ -37,6 +37,7 @@ class workstartup extends plugin
   var $FAIclass           = array();  // The currently selected classes 
   var $FAIrelease         = "";
   var $FAIdebianMirror    = "auto";
+  var $si_fai_action_failed = FALSE;
 
   var $cache              = array(); // Used as cache in fai mehtods
 
@@ -228,7 +229,7 @@ class workstartup extends plugin
     }
 
 
-    if($this->fai_activated){
+    if($this->fai_activated && !$this->si_fai_action_failed){
 
       /* Check if the current mirror is available 
        */
@@ -607,10 +608,11 @@ class workstartup extends plugin
     $smarty->assign("fai_activated",$this->fai_activated);
 
     /* Create FAI output */
-    if($this->fai_activated){
-
-      $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("FAIservers"  , $this->cache['SERVERS']);
       $smarty->assign("FAIdebianMirror",$this->FAIdebianMirror);
       $smarty->assign("FAIrelease"  , $this->FAIrelease);
@@ -1070,7 +1072,8 @@ class workstartup extends plugin
   function update_fai_cache($first_call = FALSE)
   {
     $force = FALSE;
-
+    $this->si_fai_action_failed = false;
+  
     $start = microtime(TRUE);  
 
     /* Get the list of available servers and their releases. 
@@ -1087,6 +1090,8 @@ class workstartup extends plugin
       $tmp = $o_queue->FAI_get_server(); 
       if($o_queue->is_error()){
         msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
+        $this->si_fai_action_failed = TRUE;
+        return;
       }else{
         foreach($tmp as $entry){
           $rel = $entry['RELEASE'];
@@ -1131,6 +1136,8 @@ class workstartup extends plugin
       $this->cache['CLASSES'][$release] = array();
       if($o_queue->is_error()){
         msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
+        $this->si_fai_action_failed = TRUEi;
+        return;
       }else{
         foreach($tmp as $entry){
           $class = $entry['CLASS'];
index fbec00ab4334d2dc70b5b230858aad41e3450480..2523fae7c15a803d3f89a14c79f50b446945260b 100644 (file)
   
   <td style="vertical-align:top;">
 
-       {if $fai_activated}
+       {if $si_fai_action_failed}
+               <b>{msgPool type=siError}</b><br>
+               {t}Check if the GOsa support daemon (gosa-si) is running.{/t}
+       {elseif $fai_activated}
 
                {if $FAIdebianMirror == "inherited"}