Class: EC2::Platform::Base::System

Inherits:
Object
  • Object
show all
Defined in:
lib/ec2/platform/base.rb

Direct Known Subclasses

Linux::System, Solaris::System

Constant Summary collapse

MOUNT_POINT =
'/mnt/img-mnt'

Class Method Summary collapse

Class Method Details

.distributionObject



37
38
39
# File 'lib/ec2/platform/base.rb', line 37

def self.distribution
  Distribution::UNKNOWN
end

.exec(cmd, debug) ⇒ Object



45
46
47
48
49
50
51
52
53
# File 'lib/ec2/platform/base.rb', line 45

def self.exec(cmd, debug)
  if debug
    puts( "Executing: #{cmd} " )
    suffix = ''
  else
    suffix = ' 2>&1 > /dev/null'
  end
  raise "execution failed: \"#{cmd}\"" unless system( cmd + suffix )
end

.superuser?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/ec2/platform/base.rb', line 41

def self.superuser?
  false
end