From: Michael Rasmussen Date: Sun, 2 Mar 2014 23:03:25 +0000 (+0100) Subject: Use OMVUtil::exec X-Git-Url: http://git.datanom.net/omvzfs.git/commitdiff_plain/eb034e478f3c2d700f8ee87bf67dc79159b703cd Use OMVUtil::exec --- diff --git a/src/Dataset.php b/src/Dataset.php index afdd172..025126a 100644 --- a/src/Dataset.php +++ b/src/Dataset.php @@ -1,5 +1,6 @@ = to set when creating the Dataset * @throws OMVModuleZFSException @@ -52,7 +53,7 @@ class OMVModuleZFSDataset { } } $cmd .= $name . " 2>&1"; - exec($cmd,$out,$res); + OMVUtil::exec($cmd,$out,$res); if ($res == 1) { throw new OMVModuleZFSException(implode("\n", $out)); } @@ -106,13 +107,13 @@ class OMVModuleZFSDataset { * Sets a number of Dataset properties. If a property is already set it will be updated with the new value. * * @param array $features An array of strings in format = - * @return void + * @return void * @access public */ public function setFeatures($features) { foreach ($features as $newfeature) { $cmd = "zfs set " . $newfeature . " " . $this->name; - exec($cmd,$out,$res); + OMVUtil::exec($cmd,$out,$res); if ($res == 1) { throw new OMVModuleZFSException(implode("\n", $out)); } @@ -140,7 +141,7 @@ class OMVModuleZFSDataset { */ public function destroy() { $cmd = "zfs destroy " . $this->name; - exec($cmd,$out,$res); + OMVUtil::exec($cmd,$out,$res); if ($res == 1) { throw new OMVModuleZFSException(implode("\n", $out)); }