Beispiel #1
0
 /**
  * Run the operation
  */
 public function execute()
 {
     if (!is_array($this->payload)) {
         $this->payload = explode("\n", $this->payload);
     }
     $this->status(Phase::SCRIPT());
     if ($this->run_as_root) {
         $this->enterRoot();
     }
     foreach ($this->payload as $command) {
         $this->output($this->shell->sendSmartCommand($command, false, $this->timeout, true));
     }
     if ($this->run_as_root) {
         $this->exitRoot();
     }
 }