diff options
author | Robert Gerus <arachnist@i.am-a.cat> | 2013-09-01 19:31:20 +0200 |
---|---|---|
committer | Robert Gerus <arachnist@i.am-a.cat> | 2013-09-01 19:31:20 +0200 |
commit | c7a9e769c3d564a577c54dc1ffa3d19890ba3037 (patch) | |
tree | af1c6e54ebe5d087f9e2ceed7a3e91e25dd1c151 | |
parent | 915417dd00aa23fe11adb3bc5a590352a2eb5268 (diff) | |
download | zvolcreator-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.rb | 3 |
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) |