diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 138c48f28de47b694892fce786dd121185e0e0b8..33a49bcb040347a9de0ab30398f0989b91ac99b5 100644 (file)
var $ghGfxAdapter= "-";
var $ghSoundAdapter= "-";
var $gotoLastUser= "-";
+ var $FAIscript="";
+ var $didAction= FALSE;
/* Needed values and lists */
var $base= "";
var $attributes= array("gotoMode", "macAddress", "gotoSyslogServer", "gotoNtpServer",
"gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
"ghCpuType", "ghMemSize", "ghUsbSupport", "ipHostNumber",
- "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l");
- var $objectclasses= array("top", "gotoWorkstation", "GOhard");
+ "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l","FAIscript");
+ var $objectclasses= array("top", "gotoWorkstation", "GOhard","FAIobject");
function workgeneric ($config, $dn= NULL)
{
/* Load available modes */
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(objectClass=gotoInstallProfile)");
+ $ldap->search ("(objectClass=gotoInstallProfile)",array("cn"));
while ($attrs= $ldap->fetch()){
$this->modes[]= $attrs["cn"][0];
}
$this->modes["active"]= _("Activated");
$this->modes["locked"]= _("Locked");
$this->modes["memcheck"]= _("Memory test");
+ $this->modes["sysinfo"]= _("System analysis");
/* Set base */
if ($this->dn == "new"){
}
if (isset($_POST['action'])){
- $cmd= search_config($this->config->data['TABS'], "terminfo", "ACTIONCMD");
+ $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD");
if ($cmd == ""){
print_red(_("No ACTIONCMD definition found in your gosa.conf"));
} else {
- exec ($cmd." ".$this->macAddress." ".escapeshellarg($_POST['action']), $dummy, $retval);
+ exec ($cmd." ".$this->macAddress." ".escapeshellarg($_POST['saction']), $dummy, $retval);
if ($retval != 0){
print_red(sprintf(_("Execution of '%s' failed!"), $cmd));
+ } else {
+ $this->didAction= TRUE;
}
}
}
$smarty->assign("actions", array("halt" => _("Switch off"), "reboot" => _("Reboot"),
"instant_update" => _("Instant update"),
"update" => _("Scheduled update"),
+ "reinstall" => _("Reinstall"),
"rescan" => _("Rescan hardware")));
} else {
$smarty->assign("actions", array("wake" => _("Wake up"),
+ "reinstall" => _("Reinstall"),
"update" => _("Scheduled update")));
}
/* Arrays */
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
- $this->handle_post_events("add");
+ if(!$this->didAction){
+ $this->handle_post_events("add");
+ }
} else {
if ($this->orig_dn != $this->dn){
$this->move($this->orig_dn, $this->dn);
}
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
- $this->handle_post_events("modify");
+ if(!$this->didAction){
+ $this->handle_post_events("modify");
+ }
}
show_ldap_error($ldap->get_error());
-
- /* Optionally execute a command after we're done */
- $this->postcreate();
}
}