From: hickert Date: Thu, 16 Oct 2008 09:52:23 +0000 (+0000) Subject: Updated opsi X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6be23be835ef9796f1d184e60cd46ee14dc33456;p=gosa.git Updated opsi -Allow to send wake event git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12716 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc index 0340f1cd3..4737d6afc 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc @@ -594,6 +594,9 @@ class opsiGeneric extends plugin if($action == "install"){ $this->install_client(); } + if($action == "wake"){ + $this->wake_client(); + } } /* Get selected netboot product. @@ -676,6 +679,23 @@ class opsiGeneric extends plugin } + /* Wake up client + */ + function wake_client() + { + /* Check if we are able to communicate with the GOsa supprot daemon + */ + if(class_available("gosaSupportDaemon")){ + $o = new gosaSupportDaemon(); + if($o->connect() && class_available("DaemonEvent_wakeup")){ + $evt = new DaemonEvent_wakeup($this->config); + $evt->add_targets(array($this->mac)); + $o->append($evt); + } + } + } + + /* Return plugin informations for acl handling */ static function plInfo() { diff --git a/gosa-plugins/opsi/admin/opsi/generic.tpl b/gosa-plugins/opsi/admin/opsi/generic.tpl index 3e8780157..139b4e2e0 100644 --- a/gosa-plugins/opsi/admin/opsi/generic.tpl +++ b/gosa-plugins/opsi/admin/opsi/generic.tpl @@ -121,6 +121,7 @@ {else} {/if} + {render acl=$triggerActionACL}