summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f52753)
raw | patch | inline | side by side (parent: 8f52753)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 13:47:45 +0000 (13:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 13:47:45 +0000 (13:47 +0000) |
-removed hard coded opsi server
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12428 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12428 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsi/class_opsi.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc
index 3c964b8aaa5961c58b4e56fc2eb6a068aa5dc023..62a6363650982519588b7ff6d40ac3df0414b822 100644 (file)
{
private $config = NULL;
protected $use_alternative_xml_parse_method = TRUE;
+ protected $target = "";
/*! \brief Create opsi object.
@param
{
$this->config = $config;
gosaSupportDaemon::__construct($config);
- $this->target = "00:01:6c:9d:b9:fa";
+
+ /* Detect the target opsi host
+ */
+ $opsi_hosts = $this->get_hosts_with_module("opsi_com");
+
+ /* Just use the first result of the opsi hosts
+ */
+ $opsi_hosts[] = "asdfdasf";
+ if(count($opsi_hosts) == 1 && isset($opsi_hosts[0])){
+ $this->target = $opsi_hosts[0];
+ }elseif(count($opsi_hosts) > 1){
+ $this->target = $opsi_hosts[0];
+ msg_dialog::display(_("Opsi"),sprintf(_("More than one Opsi server were found, using the first result '%s'."),$this->target));
+ }
}
public function enabled()
{
- return(TRUE);
+ return(tests::is_mac($this->target));
}
/******************