From 0fcf643784e3408cca46bf40db9439c7cd9258a6 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 16 Oct 2008 09:53:08 +0000 Subject: [PATCH] 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 --- .../admin/systems/class_systemManagement.inc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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); -- 2.30.2