Module: Dory::Resolv::LinuxResolvconf
- Defined in:
- lib/dory/resolv/linux_resolvconf.rb
Class Method Summary collapse
- .clean ⇒ Object
- .configure ⇒ Object
- .file_nameserver_line ⇒ Object
- .has_our_nameserver? ⇒ Boolean
- .nameserver_contents ⇒ Object
Class Method Details
.clean ⇒ Object
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 |
.configure ⇒ Object
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_line ⇒ Object
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
12 13 14 |
# File 'lib/dory/resolv/linux_resolvconf.rb', line 12 def self.has_our_nameserver? Linux.has_our_nameserver? end |
.nameserver_contents ⇒ Object
8 9 10 |
# File 'lib/dory/resolv/linux_resolvconf.rb', line 8 def self.nameserver_contents Linux.nameserver_contents end |