Module: LinuxUtilinfo::OperatingSystemMethods
- Included in:
- LinuxUtilinfo
- Defined in:
- lib/linux_utilinfo/operating_system_methods.rb
Instance Method Summary collapse
Instance Method Details
#get_distro ⇒ Object
3 4 5 6 7 |
# File 'lib/linux_utilinfo/operating_system_methods.rb', line 3 def get_distro distro_name = `cat /etc/os-release | grep -i '^ID=' | cut -d '=' -f2` distro_name.strip! printf(distro_name) end |
#get_distro_release ⇒ Object
14 15 16 17 18 |
# File 'lib/linux_utilinfo/operating_system_methods.rb', line 14 def get_distro_release distro_release = `cat /etc/os-release | grep -i '^VERSION_ID=' | cut -d '=' -f 2` distro_release.gsub!(/^\"|\"?$/, '') return distro_release end |
#get_platform ⇒ Object
9 10 11 12 |
# File 'lib/linux_utilinfo/operating_system_methods.rb', line 9 def get_platform platform = `uname` return platform end |