Module: ConcertoConfig::LiveImage

Defined in:
lib/concerto_client/live_image.rb

Class Method Summary collapse

Class Method Details

.mountpointObject



7
8
9
# File 'lib/concerto_client/live_image.rb', line 7

def self.mountpoint
  '/live/image'
end

.readonly?Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/concerto_client/live_image.rb', line 11

def self.readonly?
  # on a readonly file system this will fail
  if not File.exist? self.mountpoint
    true
  else
    begin
      f = Tempfile.new('test', self.mountpoint)
      f.close!
      false
    rescue 
      # if the tempfile creation bombs we assume readonly
      true
    end
  end
end