X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgoto%2Faddons%2Fgoto%2Fclass_gotomasses.inc;h=e168b880eecb143abb367b61be94bee7848a07a8;hb=1678e943f2d883e3a01d9eeaef76f69f61b4ff2c;hp=c743130e03bdc31f4539e665cf88d3cecd92c581;hpb=eabfadd4c56e8daa3b88ee60199932d0c0be09c4;p=gosa.git diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc index c743130e0..e168b880e 100644 --- a/gosa-plugins/goto/addons/goto/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/goto/class_gotomasses.inc @@ -220,6 +220,27 @@ class gotomasses extends plugin /* Remove specified tasks */ if(count($this->ids_to_remove) && isset($_POST['delete_multiple_confirm'])){ + + /* Reboot hosts with not yet startet installations and timestamps in the past + */ + timezone::get_default_timezone(); + foreach($this->ids_to_remove as $id){ + $entry = $this->o_queue->get_entries_by_id(array($id)); + if(isset($entry['ANSWER1'])){ + $entry = $entry['ANSWER1']; + if( $entry['STATUS'] == "wating" && + $entry['HEADERTAG'] == "trigger_action_reinstall"){ + $evt = new DaemonEvent_reinstall($this->config,$entry); + if($evt->get_timestamp(FALSE) < time()){ + $r_evt = new DaemonEvent_localboot($this->config); + $r_evt->add_targets(array($entry['MACADDRESS'])); + $r_evt->set_type(TRIGGERED_EVENT); + $this->o_queue->append($r_evt); + } + } + } + } + $this->o_queue->remove_entries($this->ids_to_remove); $this->save(); }