summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2013-09-01 19:31:20 +0200
committerRobert Gerus <arachnist@i.am-a.cat>2013-09-01 19:31:20 +0200
commitc7a9e769c3d564a577c54dc1ffa3d19890ba3037 (patch)
treeaf1c6e54ebe5d087f9e2ceed7a3e91e25dd1c151
parent915417dd00aa23fe11adb3bc5a590352a2eb5268 (diff)
downloadzvolcreator-c7a9e769c3d564a577c54dc1ffa3d19890ba3037.tar.gz
zvolcreator-c7a9e769c3d564a577c54dc1ffa3d19890ba3037.tar.bz2
zvolcreator-c7a9e769c3d564a577c54dc1ffa3d19890ba3037.zip
Reordered options, fixed indentations and added parsing of extra zfs native options.
-rw-r--r--zfs_monkeypatch.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/zfs_monkeypatch.rb b/zfs_monkeypatch.rb
index f241798..34cce93 100644
--- a/zfs_monkeypatch.rb
+++ b/zfs_monkeypatch.rb
@@ -7,8 +7,9 @@ class ZFS
cmd = [ZFS.zfs_path].flatten + ['create']
cmd << '-p' if opts[:parents]
+ cmd << '-s' if opts[:volume] and opts[:sparse]
+ cmd += opts[:zfsopts].map(|el| ['-o', el]).flatten if opts[:zfsopts]
cmd += ['-V', opts[:volume]] if opts[:volume]
- cmd << '-s' if opts[:volume] and opts[:sparse]
cmd << name
out, status = Open3.capture2e(*cmd)