Class: Haconiwa::Filesystem

Inherits:
Object
  • Object
show all
Defined in:
lib/haconiwa/filesystem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFilesystem

Returns a new instance of Filesystem.



3
4
5
6
# File 'lib/haconiwa/filesystem.rb', line 3

def initialize
  @mount_points = []
  @mount_independent_procfs = false
end

Instance Attribute Details

#chrootObject

Returns the value of attribute chroot.



7
8
9
# File 'lib/haconiwa/filesystem.rb', line 7

def chroot
  @chroot
end

#mount_independent_procfsObject

Returns the value of attribute mount_independent_procfs.



7
8
9
# File 'lib/haconiwa/filesystem.rb', line 7

def mount_independent_procfs
  @mount_independent_procfs
end

#mount_pointsObject

Returns the value of attribute mount_points.



7
8
9
# File 'lib/haconiwa/filesystem.rb', line 7

def mount_points
  @mount_points
end

Instance Method Details

#mount_all!Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/haconiwa/filesystem.rb', line 10

def mount_all!
  Dir.chdir "/"
  unless mount_points.empty?
    system "mount --make-private /"

    mount_points.each do |mount|
      mount.apply!
    end
  end
end