Module: Dobby::Dpkg

Defined in:
lib/dobby/dpkg.rb

Overview

Generic Debian dpkg helper methods

Constant Summary collapse

DPKG =

Default location of the dpkg binary

'/usr/bin/dpkg'
LSBR =

Default location of the lsb_release binary

'/usr/bin/lsb_release'

Class Method Summary collapse

Class Method Details

.architecture ⇒ String

Returns System architecture.

Returns:

  • (String) —

    System architecture



17
18
19
# File 'lib/dobby/dpkg.rb', line 17

def self.architecture
  `#{DPKG} --print-architecture`.chomp!
end

.code_name ⇒ String

Returns Debian codename for this system.

Returns:

  • (String) —

    Debian codename for this system



12
13
14
# File 'lib/dobby/dpkg.rb', line 12

def self.code_name
  `#{LSBR} -sc`.chomp!
end