From: hickert Date: Thu, 16 Oct 2008 09:53:08 +0000 (+0000) Subject: Updated System management trigger event X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0fcf643784e3408cca46bf40db9439c7cd9258a6;p=gosa.git Updated System management trigger event -Only trigger event for terminals, workstations, opsi and server objects. -Allow to send opsi wake. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12717 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 67cef2fe6..eacdf888f 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -722,12 +722,19 @@ class systems extends plugin if(count($ids) && class_available("DaemonEvent")){ $mac= array(); + /* Collect target mac addresses */ $ldap = $this->config->get_ldap_link(); foreach($ids as $id){ - $ldap->cat ($this->terminals[$id]['dn'], array("macAddress")); - $attrs= $ldap->fetch(); - if (isset($attrs['macAddress'][0])){ - $mac[]= $attrs['macAddress'][0]; + $type = $this->get_system_type($this->terminals[$id]); + if(!in_array($type,array("terminal","server","workstation","opsi_client","winstation "))) continue; + if(isset($this->terminals[$id]['macAddress'][0])){ + $mac[] = $this->terminals[$id]['macAddress'][0]; + }else{ + $ldap->cat ($this->terminals[$id]['dn'], array("macAddress")); + $attrs= $ldap->fetch(); + if (isset($attrs['macAddress'][0])){ + $mac[]= $attrs['macAddress'][0]; + } } } $events = DaemonEvent::get_event_types(SYSTEM_EVENT);