From eb034e478f3c2d700f8ee87bf67dc79159b703cd Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Mon, 3 Mar 2014 00:03:25 +0100 Subject: [PATCH] Use OMVUtil::exec --- src/Dataset.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)); } -- 2.39.2