Code

Fixed two small typos.
[gosa.git] / gosa-plugins / systems / admin / systems / class_servGeneric.inc
index 033c9fb5c99e65ed73459bafbe271cd0b05a0ff4..a111d7cc9d30d3dc1ff5a5f18b86214ae1a7b041 100644 (file)
@@ -106,7 +106,12 @@ class servgeneric extends plugin
 
     /* Check for action */
     if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate")) && isset($this->mapActions[$_POST['saction']]) ){
-      gosaSupportDaemon::send("gosa_trigger_action_".$_POST['saction'], $this->netConfigDNS->macAddress, array("macAddress" => $this->netConfigDNS->macAddress));
+        $method= "gosa";
+        $action= $_POST['saction'];
+       if ($action == "reinstall" || $action == "update" || $action == "instant_update"){
+                $method= "job";
+        }
+        gosaSupportDaemon::send("${method}_trigger_action_".$action, $this->netConfigDNS->macAddress, array("macAddress" => $this->netConfigDNS->macAddress));
 
       $this->didAction= TRUE;
 
@@ -195,11 +200,7 @@ class servgeneric extends plugin
     $smarty->assign("base_select", $this->base);
 
     /* Assign status */
-    $query= "fping -q -r 1 -t 500 ".$this->cn;
-    exec ($query, $dummy, $retval);
-
-    /* Offline */
-    if ($retval == 0){
+    if (gosaSupportDaemon::ping($this->netConfigDNS->macAddress)){
       $smarty->assign("actions", array("halt" => _("Switch off"), "reboot" => _("Reboot"),
                                        "instant_update" => _("Instant update"),
                                        "update" => _("Scheduled update"),