summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e0e71a2)
raw | patch | inline | side by side (parent: e0e71a2)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Feb 2008 13:17:25 +0000 (13:17 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Feb 2008 13:17:25 +0000 (13:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8781 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index 07b7bfa822d4f774815c4214e85e92162f35d16c..aeddfc9caa06ef6f16fb7ba8ebd4278105c1fe20 100644 (file)
"update" => "sceduledupdate",
"reinstall" => "install",
"rescan" => "",
+ "wake" => "",
"memcheck" => "memcheck",
"sysinfo" => "sysinfo");
}
/* Check for action */
- if (isset($_POST['action']) && $this->acl_is_writeable("FAIstate")){
- $cmd = $this->config->search("workgeneric", "ACTIONCMD",array('tabs'));
- if ($cmd == ""){
- print_red(_("No ACTIONCMD definition found in your gosa.conf"));
- } else {
-
- exec ($cmd." ".$this->netConfigDNS->macAddress." ".escapeshellarg($_POST['saction']), $dummy, $retval);
- if ($retval != 0){
- print_red(sprintf(_("Execution of '%s' failed!"), $cmd));
- } else {
- $this->didAction= TRUE;
+ if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate")) && isset($this->mapActions[$_POST['saction']]) ){
+ gosaSupportDaemon::send("gosa_trigger_action_".$_POST['saction'], $this->netConfigDNS->ipHostNumber, array("macAddress" => $this->netConfigDNS->macAddress));
+
+ $this->didAction= TRUE;
+
+ if ($_POST['saction'] != "wake") {
/* Set FAIstate */
if($this->fai_activated && $this->dn != "new"){
}
if($attrs['FAIstate'] == ""){
-#FIXME we should check if FAIobject is used anymore
+ #FIXME we should check if FAIobject is used anymore
$attrs['FAIstate'] = array();
}
$ldap->cd($this->dn);
$ldap->modify($attrs);
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/generic (FAIstate) with dn '%s' failed."),$this->dn));
- }
+ show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/generic (FAIstate) with dn '%s' failed."),$this->dn));
}
}
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 02c4508f525ac1cee5c76a9ef188127a76046267..33190041f3bc15d500cd8788323cd5d5d8f8dc25 100644 (file)
$dialog = TRUE;
}
}
- if(isset($this->systab->by_object[$this->systab->current]->netConfigDNS) &&
+ if(isset($this->systab->current) && isset($this->systab->by_object[$this->systab->current]->netConfigDNS) &&
$this->systab->by_object[$this->systab->current]->netConfigDNS->dialog){
$dialog = TRUE;
}
diff --git a/gosa-plugins/systems/admin/systems/server.tpl b/gosa-plugins/systems/admin/systems/server.tpl
index 4e2d9b6a4c0147b6e7e86d460fd9df79fd647ad2..01e35a3a6a736a50baa5bd8f5bf04d5fba339cf4 100644 (file)
<td>
{render acl=$FAIstateACL}
<select size="1" name="saction" title="{t}Select action to execute for this server{/t}">
- <option disabled> </option>
+ <option> </option>
{html_options options=$actions}
</select>
{/render}