class EC2::Platform::Linux::System
Constants
- BUNDLING_ARCHITECTURE
Public Class Methods
distribution()
click to toggle source
# File lib/ec2/platform/linux.rb, line 63 def self.distribution Distribution::IDENTITIES.each do |file, distro, regex| if File.exists? file if regex.is_a? Regexp return distro if regex.match((IO.read file rescue nil)) else return distro end end end return Distribution::UNKNOWN end
superuser?()
click to toggle source
# File lib/ec2/platform/linux.rb, line 77 def self.superuser?() return `id -u`.strip == '0' end