Sha256: 0cc08ed65f89527c8ae75b019fd2ae54ad0b2186172ba14ed527449c520c3c57

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

module Getch
  module FileSystem
    module Zfs
      class Device < Getch::FileSystem::Device
        def initialize
          super
          @id = Helpers::pool_id(@dev_root)
          @boot_pool_name = "bpool-#{@id}"
          @pool_name = "rpool-#{@id}"
          @zfs_home = @user ? true : false
        end
        
        private

        def search_boot
          if @boot_disk
            @dev_gpt = @efi ? nil : "/dev/#{@boot_disk}1"
            @dev_boot = @efi ? nil : "/dev/#{@boot_disk}2"
            @dev_esp  = @efi ? "/dev/#{@boot_disk}1" : nil
          else
            @dev_gpt = @efi ? nil : "/dev/#{@disk}#{@root_part}"
            @dev_esp = @efi ? "/dev/#{@disk}#{@root_part}" : nil
            @boot_disk = @disk # used by grub
            @root_part += 1
            @dev_boot = @efi ? nil : "/dev/#{@disk}#{@root_part}"
            @root_part += 1 if ! @efi
          end
        end

        def search_root
          if @root_part == 1
            @dev_root = "/dev/#{@disk}"
          else
            @dev_root = "/dev/#{@disk}#{@root_part}"
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
getch-0.1.1 lib/getch/filesystem/zfs/device.rb