diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index ef68b3993add8d2a3e020635384a8a83ab3a8187..4604c98a77c16c7965795458e083127982d3c129 100644 (file)
var $objectclasses= array("top", "gotoWorkstation", "GOhard");
var $mapActions = array("reboot" => "localboot",
var $objectclasses= array("top", "gotoWorkstation", "GOhard");
var $mapActions = array("reboot" => "localboot",
+ "localboot" => "localboot",
"instant_update" => "softupdate",
"update" => "sceduledupdate",
"reinstall" => "install",
"instant_update" => "softupdate",
"update" => "sceduledupdate",
"reinstall" => "install",
$this->gotoSyslogServers[$server] = $visible;
}
$this->gotoSyslogServers[$server] = $visible;
}
+ if($this->is_account){
+ @log::log("view","workstation/".get_class($this),$this->dn);
+ }
+
/* Save 'dn' for later referal */
$this->orig_dn= $this->dn;
}
/* Save 'dn' for later referal */
$this->orig_dn= $this->dn;
}
} elseif ($_POST['saction'] != "wake") {
/* Set FAIstate */
} elseif ($_POST['saction'] != "wake") {
/* Set FAIstate */
- if($this->fai_activated){
+ if($this->fai_activated && $this->dn != "new"){
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
$ldap->cat($this->dn,array("objectClass"));
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
$ldap->cat($this->dn,array("objectClass"));
"reinstall" => _("Reinstall"),
"rescan" => _("Rescan hardware"),
"memcheck" => _("Memory test"),
"reinstall" => _("Reinstall"),
"rescan" => _("Rescan hardware"),
"memcheck" => _("Memory test"),
+ "localboot" => _("Force localboot"),
"sysinfo" => _("System analysis")));
} else {
$smarty->assign("actions", array("wake" => _("Wake up"),
"reinstall" => _("Reinstall"),
"update" => _("Scheduled update"),
"memcheck" => _("Memory test"),
"sysinfo" => _("System analysis")));
} else {
$smarty->assign("actions", array("wake" => _("Wake up"),
"reinstall" => _("Reinstall"),
"update" => _("Scheduled update"),
"memcheck" => _("Memory test"),
+ "localboot" => _("Force localboot"),
"sysinfo" => _("System analysis")));
}
/* Arrays */
"sysinfo" => _("System analysis")));
}
/* Arrays */
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
+ @log::log("remove","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system workstation/generic with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system workstation/generic with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
- $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
+ $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS-ipHostNumber));
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
/* Strip out 'default' values */
foreach (array("gotoSyslogServer") as $val){
/* Strip out 'default' values */
foreach (array("gotoSyslogServer") as $val){
- if ($this->attrs[$val] == "default"){
+ if (isset($this->attrs[$val]) && $this->attrs[$val] == "default"){
$this->attrs[$val]= array();
}
}
$this->attrs[$val]= array();
}
}
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
+ @log::log("create","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
if(!$this->didAction){
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
if(!$this->didAction){
- $this->handle_post_events("add");
+ $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
}
} else {
if ($this->orig_dn != $this->dn){
}
} else {
if ($this->orig_dn != $this->dn){
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
if(!$this->didAction){
if(!$this->didAction){
- $this->handle_post_events("modify");
+ $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
}
}
}
}
- print_a($this->attrs);
-
/* cn=default and macAddress=- indicates that this is a template */
if($this->cn == "wdefault"){
$this->netConfigDNS->macAddress = "-";
/* cn=default and macAddress=- indicates that this is a template */
if($this->cn == "wdefault"){
$this->netConfigDNS->macAddress = "-";