Class: DanarchyDeploy::System::OpenSUSE

Inherits:
Object
  • Object
show all
Defined in:
lib/danarchy_deploy/system/opensuse.rb

Class Method Summary collapse

Class Method Details

.new(deployment, options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/danarchy_deploy/system/opensuse.rb', line 5

def self.new(deployment, options)
  puts "\n" + self.name
  puts "#{deployment[:os].capitalize} detected! Using zypper."

  set_hostname(deployment[:hostname]) if !options[:pretend]
  puts "Updating zypper repositories..."
  DanarchyDeploy::Helpers.run_command('sudo zypper refresh', options)

  installer = 'zypper install '
  updater = 'zypper upgrade'
  cleaner = nil
  zypper_refresh_repos = DanarchyDeploy::Helpers.run_command('zypper refresh', options)
  # Needs package checking & testing

  [installer, updater, cleaner]
end