Module: Dory::Resolv::LinuxResolvconf

Defined in:
lib/dory/resolv/linux_resolvconf.rb

Class Method Summary collapse

Class Method Details

.cleanObject



21
22
23
24
# File 'lib/dory/resolv/linux_resolvconf.rb', line 21

def self.clean
  puts 'Requesting sudo to run resolvconf'.green
  Bash.run_command("sudo resolvconf -d lo.dory")
end

.configureObject



16
17
18
19
# File 'lib/dory/resolv/linux_resolvconf.rb', line 16

def self.configure
  puts 'Requesting sudo to run resolvconf'.green
  Bash.run_command("echo -e '#{self.nameserver_contents}' | sudo resolvconf -a lo.dory")
end

.file_nameserver_lineObject



4
5
6
# File 'lib/dory/resolv/linux_resolvconf.rb', line 4

def self.file_nameserver_line
  Linux.file_nameserver_line
end

.has_our_nameserver?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/dory/resolv/linux_resolvconf.rb', line 12

def self.has_our_nameserver?
  Linux.has_our_nameserver?
end

.nameserver_contentsObject



8
9
10
# File 'lib/dory/resolv/linux_resolvconf.rb', line 8

def self.nameserver_contents
  Linux.nameserver_contents
end