Module: CommandKit::OS::Linux::ClassMethods
- Defined in:
- lib/command_kit/os/linux.rb
Overview
Instance Method Summary collapse
-
#linux_distro ⇒ :fedora, ...
Determines the specific Linux distro.
Instance Method Details
#linux_distro ⇒ :fedora, ...
Determines the specific Linux distro.
69 70 71 72 73 74 75 76 |
# File 'lib/command_kit/os/linux.rb', line 69 def linux_distro if File.file?('/etc/fedora-release') then :fedora elsif File.file?('/etc/redhat-release') then :redhat elsif File.file?('/etc/debian_version') then :debian elsif File.file?('/etc/SuSE-release') then :suse elsif File.file?('/etc/arch-release') then :arch end end |