projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d7734f
)
fix crash if no dnsmasq_conf_dir configured
author
Tom Clegg <tom@clinicalfuture.com>
Thu, 10 Jan 2013 20:39:23 +0000
(12:39 -0800)
committer
Tom Clegg <tom@clinicalfuture.com>
Thu, 10 Jan 2013 20:39:23 +0000
(12:39 -0800)
app/models/node.rb
patch
|
blob
|
history
diff --git
a/app/models/node.rb
b/app/models/node.rb
index 4b51fd4bfe1ceda205a6d3aa87b3473cb9aa2526..29233748dd1cf77cc61b77fc08b23130dee0102c 100644
(file)
--- a/
app/models/node.rb
+++ b/
app/models/node.rb
@@
-5,9
+5,12
@@
class Node < ActiveRecord::Base
MAX_SLOTS = 64
- @@confdir = begin
- Rails.configuration.dnsmasq_conf_dir or
- ('/etc/dnsmasq.d' if File.exists? '/etc/dnsmasq.d/.')
+ @@confdir = if Rails.configuration.respond_to? :dnsmasq_conf_dir
+ Rails.configuration.dnsmasq_conf_dir
+ elsif File.exists? '/etc/dnsmasq.d/.'
+ '/etc/dnsmasq.d'
+ else
+ nil
end
def info