diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc
index ec2c51a05c7807910e1c619bf04231d6612a6fb6..a60ce9085464a6a735a91787dbcceec0a2f2e345 100644 (file)
$this->target = "00:01:6c:9d:b9:fa";
}
+
+ public function enabled()
+ {
+ return(TRUE);
+ }
/******************
Opsi handling
/*! \brief Trigger an event like wake or install for a specific hostId.
*/
- public function send_action($type,$hostId)
+ public function send_action($type,$hostId,$mac)
{
switch($type){
- case 'install' : $this->job_opsi_install_client($hostId); break;
- case 'wake' : $this->job_opsi_wake_client($hostId); break;
+ case 'install' : $this->job_opsi_install_client($hostId,$mac); break;
default : trigger_error('Unknown type '.$type.'.');
}
}
@param
@return
*/
- public function job_opsi_install_client($hostId)
+ public function job_opsi_install_client($hostId,$mac)
{
- $data = array("hostId" => $hostId);
+ $data = array("hostId" => $hostId,"macaddress"=>$mac);
/* Check parameter */
if(empty($hostId)){
/* Query SI server */
$this->send_data("job_opsi_install_client",$this->target,$data,TRUE);
}
-
-
- /*! \brief Triggers install/reinstall of an opsi client.
- @param
- @return
- */
- public function job_opsi_wake_client($hostId)
- {
- $data = array("hostId" => $hostId);
-
- /* Check parameter */
- if(empty($hostId)){
- trigger_error("No valid host id given, check parameter 1.");
- return;
- }
-
- /* Query SI server */
- $this->send_data("job_opsi_wake_client",$this->target,$data,TRUE);
- }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>