class AutomateIt::PlatformManager::LSB
PlatformManager::LSB¶ ↑
A PlatformManager driver for LSB
(Linux Standards Base) systems. The platform doesn’t actually need to be Linux, but simply has to provide an lsb_release
command.
Constants
- LSB_RELEASE
Protected Instance Methods
_parse_lsb_release_data(data)
click to toggle source
Parses LSB
data into a hash.
# File lib/automateit/platform_manager/lsb.rb, line 41 def _parse_lsb_release_data(data) data.scan(/^([^:]+):\s+([^\n]+)/).inject({}){|s,v| s[v.first] = v.last; s} end
_read_lsb_release_data()
click to toggle source
Returns the LSB
data for this platform’s Distributor and ID
# File lib/automateit/platform_manager/lsb.rb, line 32 def _read_lsb_release_data # TODO Consider parsing files directly to avoid the overhead of this command. # # Do NOT use 'lsb_release -a' because this takes a few seconds. Telling # 'lsb_release' which fields we want makes it much faster. `"#{LSB_RELEASE}" --release --id` end