Class: Devs::MatZfs
Instance Method Summary collapse
- #boot ⇒ Object
-
#initialize(disk, args) ⇒ MatZfs
constructor
A new instance of MatZfs.
- #swap ⇒ Object
Methods inherited from Matrice
Constructor Details
#initialize(disk, args) ⇒ MatZfs
Returns a new instance of MatZfs.
164 165 166 167 168 |
# File 'lib/devs.rb', line 164 def initialize(disk, args) @zfs_cache = args[:zfs_cache] ||= nil @systemd_boot = args[:systemd_boot] ||= false super end |
Instance Method Details
#boot ⇒ Object
170 171 172 173 174 175 176 177 |
# File 'lib/devs.rb', line 170 def boot @boot || return @systemd_boot && return @device.boot "#{@disk}#{@@part}" @@part += 1 end |
#swap ⇒ Object
179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/devs.rb', line 179 def swap @swap || return if @zfs_cache @device.swap "#{@disk}#{@@part}" @@part += 1 @device.zlog "#{@disk}#{@@part}" @@part += 1 @device.zcache "#{@disk}#{@@part}" else @device.swap "#{@disk}#{@@part}" @@part += 1 end end |