summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: babd452)
raw | patch | inline | side by side (parent: babd452)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Mar 2010 16:10:13 +0000 (16:10 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Mar 2010 16:10:13 +0000 (16:10 +0000) |
When copying workstations / terminals additional copy
some missing attributes (FAIstate, gotoSysStatus, etc.)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@16386 594d385d-05f5-0310-b6e9-bd551577e9d8
some missing attributes (FAIstate, gotoSysStatus, etc.)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@16386 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index 0c043fe3c0728d5bb194c26de9c6d0eaee57530c..c9590f7b2f7aa37291209f5727b2274da3c1da08 100644 (file)
var $ghScsiDev= array();
var $ghGfxAdapter= "-";
var $ghSoundAdapter= "-";
+ var $gotoHardwareChecksum = "";
+ var $gotoSysStatus = "";
var $gotoLastUser= "-";
var $netConfigDNS;
var $auto_activate= FALSE;
"gotoSwapServer", "gotoSyslogServer", "gotoNtpServer",
"gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
"ghCpuType", "ghMemSize","ghUsbSupport", "description",
- "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser");
+ "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", 'gotoHardwareChecksum', 'gotoSysStatus');
var $objectclasses= array("top", "gotoTerminal", "GOhard");
var $validActions = array("reboot" => "", "rescan" => "", "wake" => "", "memcheck" => "", "sysinfo" => "");
$this->inheritTimeServer = true;
$this->gotoNtpServer=array();
}
+
+ $source_o = new termgeneric($this->config, $source['dn']);
+ foreach (array('ghIdeDev', 'ghNetNic', 'ghScsiDev') as $attr) {
+ if (isset($source_o->$attr)) {
+ $this->$attr = $source_o->$attr;
+ }
+ }
+
+ $ldap = $this->config->get_ldap_link();
+ $res = $ldap->cat($source['dn'], array('gotoHardwareChecksum', 'gotoSysStatus'));
+ if ($res) {
+ $attrs = $ldap->fetch();
+ foreach(array('gotoHardwareChecksum', 'gotoSysStatus') as $attr) {
+ if (isset($attrs[$attrs])) {
+ $this->$attr = $attrs[$attr][0];
+ }
+ }
+ }
}
diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
index a9c0d62d8a4644083f60e952df26e573ca487701..1872e0223810c285164264b49e96075436e04f9c 100644 (file)
var $ghScsiDev= array();
var $ghGfxAdapter= "-";
var $ghSoundAdapter= "-";
+ var $gotoHardwareChecksum = "";
+ var $gotoSysStatus = "";
var $gotoLastUser= "-";
var $FAIscript= "";
var $view_logged = FALSE;
var $attributes= array("gotoMode", "gotoSyslogServer", "gotoNtpServer",
"gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule",
"ghCpuType", "ghMemSize", "ghUsbSupport", "description",
- "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l","FAIscript");
+ "ghGfxAdapter", "ghSoundAdapter", "gotoLastUser", "l","FAIscript",
+ "gotoHardwareChecksum", "gotoSysStatus");
var $objectclasses= array("top", "gotoWorkstation", "GOhard");
var $validActions = array("reboot" => "", "localboot" => "", "halt" => "", "update" => "", "reinstall" => "",
$this->inheritTimeServer = true;
$this->gotoNtpServer=array();
}
+
+ $source_o = new workgeneric($this->config, $source['dn']);
+ foreach (array('ghIdeDev', 'ghNetNic', 'ghScsiDev') as $attr) {
+ if (isset($source_o->$attr)) {
+ $this->$attr = $source_o->$attr;
+ }
+ }
+
+ $ldap = $this->config->get_ldap_link();
+ $res = $ldap->cat($source['dn'], array('gotoHardwareChecksum', 'gotoSysStatus'));
+ if ($res) {
+ $attrs = $ldap->fetch();
+ foreach(array('gotoHardwareChecksum', 'gotoSysStatus') as $attr) {
+ if (isset($attrs[$attr])) {
+ $this->$attr = $attrs[$attr][0];
+ }
+ }
+ }
}
diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index b1ae491fcc536fb43adbaa9feac5d5332f53a839..eba1146bbf3617a2b4df9397bf74686dc25b96bd 100644 (file)
/* attribute list for save action */
var $attributes = array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters",
- "FAIclass", "FAIstatus", "gotoShare","FAIdebianMirror", "FAIrelease");
+ "FAIclass", "FAIstate", "FAIstatus", "gotoShare","FAIdebianMirror", "FAIrelease");
var $objectclasses = array("GOhard", "FAIobject");
/* Share */
var $FAIclass = array(); // The currently selected classes
var $FAIrelease = "";
var $FAIdebianMirror = "auto";
+ var $FAIstate = "";
var $si_active = FALSE;
var $si_fai_action_failed = FALSE;
function PrepareForCopyPaste($source)
{
plugin::PrepareForCopyPaste($source);
+
$source_o = new workstartup ($this->config, $source['dn']);
foreach(array("FAIclass","gotoModules", "gotoAutoFs", "gotoFilesystem",
- "gotoKernelParameters","gotoShares","gotoLdapServers", "gotoLdap_inherit") as $attr){
+ "FAIstate", "FAIrelease", "gotoKernelParameters","gotoShares",
+ "gotoLdapServers", "gotoLdap_inherit") as $attr){
$this->$attr = $source_o->$attr;
}
+ if (isset($source['FAIstate'])) {
+ $this->attrs['FAIstate'] = $source['FAIstate'];
+ }
}