- $this->updateAllProperties();
- $this->setProperties($properties);
- $this->mountPoint = $this->properties["mountpoint"]["value"];
+ $qname = preg_quote($name, '/');
+ $cmd = "zfs list -H";
+ $this->exec($cmd, $out, $res);
+ foreach ($out as $line) {
+ if (preg_match('/^' . $qname . '\t.*$/', $line)) {
+ $this->updateAllProperties();
+ $this->mountPoint = $this->properties["mountpoint"]["value"];
+ continue;
+ }
+ }
+ $qname = preg_quote($name . "@", '/');
+ $cmd = "zfs list -H -t snapshot";
+ $this->exec($cmd, $out, $res);
+ foreach ($out as $line) {
+ if (preg_match('/^(' . $qname . '[^\s]+)\t.*$/', $line, $res)) {
+ $this->snapshots[$res[1]] = new OMVModuleZFSSnapshot($res[1]);
+ }
+ }