Class: Y2Network::ConfigWriters::InterfacesWriter
- Inherits:
-
Object
- Object
- Y2Network::ConfigWriters::InterfacesWriter
- 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
-
#initialize(reload: true) ⇒ InterfacesWriter
constructor
Constructor.
-
#write(interfaces) ⇒ Object
Writes interfaces hardware configuration and refreshes udev.
Constructor Details
#initialize(reload: true) ⇒ InterfacesWriter
Constructor
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
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 |