Class: Y2Network::ConfigWriters::InterfacesWriter

Inherits:
Object
  • Object
show all
Defined in:
src/lib/y2network/config_writers/interfaces_writer.rb

Overview

This class writes interfaces specific configuration

Although it might be confusing, this class is only responsible for writing hardware specific configuration through udev rules.

Instance Method Summary collapse

Constructor Details

#initialize(reload: true) ⇒ InterfacesWriter

Constructor

Parameters:

  • reload (Boolean) (defaults to: true)

    whether the udev rules should be reloaded or not



38
39
40
# File 'src/lib/y2network/config_writers/interfaces_writer.rb', line 38

def initialize(reload: true)
  @reload = reload
end

Instance Method Details

#write(interfaces) ⇒ Object

Writes interfaces hardware configuration and refreshes udev

Parameters:



45
46
47
48
# File 'src/lib/y2network/config_writers/interfaces_writer.rb', line 45

def write(interfaces)
  shut_down_old_interfaces(interfaces)
  update_udevd(interfaces)
end