Class: Haconiwa::Filesystem
- Inherits:
-
Object
- Object
- Haconiwa::Filesystem
- Defined in:
- lib/haconiwa/filesystem.rb
Instance Attribute Summary collapse
-
#chroot ⇒ Object
Returns the value of attribute chroot.
-
#mount_independent_procfs ⇒ Object
Returns the value of attribute mount_independent_procfs.
-
#mount_points ⇒ Object
Returns the value of attribute mount_points.
Instance Method Summary collapse
-
#initialize ⇒ Filesystem
constructor
A new instance of Filesystem.
- #mount_all! ⇒ Object
Constructor Details
#initialize ⇒ Filesystem
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
#chroot ⇒ Object
Returns the value of attribute chroot.
7 8 9 |
# File 'lib/haconiwa/filesystem.rb', line 7 def chroot @chroot end |
#mount_independent_procfs ⇒ Object
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_points ⇒ Object
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 |