<?php
require_once("Exception.php");
+require_once("openmediavault/util.inc");
/**
* XXX detailed description
/**
* Constructor
- *
+ *
* @param string $name Name of the new Dataset
* @param array $features An array of features (strings) in the form <key>=<value> to set when creating the Dataset
* @throws OMVModuleZFSException
}
}
$cmd .= $name . " 2>&1";
- exec($cmd,$out,$res);
+ OMVUtil::exec($cmd,$out,$res);
if ($res == 1) {
throw new OMVModuleZFSException(implode("\n", $out));
}
* 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 <key>=<value>
- * @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));
}
*/
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));
}