Class: Invoker::Power::Distro::Arch
- Defined in:
- lib/invoker/power/setup/distro/arch.rb
Constant Summary
Constants inherited from Base
Base::RESOLVER_DIR, Base::SOCAT_SHELLSCRIPT, Base::SOCAT_SYSTEMD
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
distro_installer, #initialize, #resolver_file, #restart_services
Constructor Details
This class inherits a constructor from Invoker::Power::Distro::Base
Instance Method Details
#install_required_software ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/invoker/power/setup/distro/arch.rb', line 5 def install_required_software system("pacman -S --needed --noconfirm dnsmasq socat") system("mkdir -p /etc/dnsmasq.d") unless File.open("/etc/dnsmasq.conf").each_line.any? { |line| line.chomp == "conf-dir=/etc/dnsmasq.d" } File.open("/etc/dnsmasq.conf", "a") {|f| f.write("conf-dir=/etc/dnsmasq.d") } end end |