Class: Y2Network::ConfigWriters::DNSWriter

Inherits:
Object
  • Object
show all
Includes:
Yast::Logger
Defined in:
src/lib/y2network/config_writers/dns_writer.rb

Overview

This class writes DNS configuration settings.

Instance Method Summary collapse

Instance Method Details

#write(dns, old_dns, netconfig_update: true) ⇒ Object

Writes DNS configuration

Parameters:

  • dns (Y2Network::DNS)

    DNS configuration

  • old_dns (Y2Network::DNS)

    Old DNS configuration

  • netconfig_update (Boolean) (defaults to: true)

    Whether 'netconfig update' should be called after writing the DNS configuration or not



35
36
37
38
39
40
# File 'src/lib/y2network/config_writers/dns_writer.rb', line 35

def write(dns, old_dns, netconfig_update: true)
  return if old_dns && dns == old_dns

  update_mta_config
  update_sysconfig_config(dns, netconfig_update: netconfig_update)
end