Permalink
Browse files

Fixes Bug #800, Adds support for tftp_servername

Setting this value overrides the value in the subnet
declaration for the name of the tftp server

Signed-off-by: Mark Bainter <mark.bainter@match.com>
  • Loading branch information...
1 parent 3287040 commit b2aa8c03244e125ebf1fbb68f52ed126dbf9b269 @ohadlevy ohadlevy committed Apr 17, 2011
Showing with 8 additions and 0 deletions.
  1. +2 −0 config/settings.yml.example
  2. +6 −0 lib/tftp_api.rb
@@ -23,6 +23,8 @@
# Enable TFTP management
:tftp: false
#:tftproot: /var/lib/tftpboot
+# Defines the TFTP Servername to use, overrides the name in the subnet declaration
+#:tftp_servername: tftp.domain.com
# Enable DNS management
View
@@ -26,6 +26,12 @@ class SmartProxy
end
end
+ # Get the value for next_server
+ get "/tftp/serverName" do
+ {"serverName" => (SETTINGS.tftp_servername || "")}.to_json
+ end
+
+
# delete a record from a network
delete "/tftp/:mac" do
begin

0 comments on commit b2aa8c0

Please sign in to comment.