lib/dev-lxc.rb in dev-lxc-2.3.0 vs lib/dev-lxc.rb in dev-lxc-2.3.1
- old
+ new
@@ -91,18 +91,11 @@
FileUtils.chmod(0600, "#{base_container.config_item('lxc.rootfs')}/home/dev-lxc/.ssh/authorized_keys")
base_container.run_command("chown -R dev-lxc:dev-lxc /home/dev-lxc/.ssh")
IO.write("#{base_container.config_item('lxc.rootfs')}/etc/sudoers.d/dev-lxc", "dev-lxc ALL=NOPASSWD:ALL\n")
FileUtils.chmod(0440, "#{base_container.config_item('lxc.rootfs')}/etc/sudoers.d/dev-lxc")
- base_container.stop
+ base_container.shutdown
return base_container
- end
-
- def self.assign_ip_address(ipaddress, container_name, hwaddr)
- puts "Assigning IP address #{ipaddress} to '#{container_name}' container's lxc.network.hwaddr #{hwaddr}"
- search_file_delete_line("/etc/lxc/dhcp-hosts.conf", /(^#{hwaddr}|,#{ipaddress}$)/)
- append_line_to_file("/etc/lxc/dhcp-hosts.conf", "#{hwaddr},#{ipaddress}\n")
- reload_dnsmasq
end
def self.reload_dnsmasq
system("pkill -HUP dnsmasq")
end