Revision e51eda38
Added by Ohad Levy over 12 years ago
- ID e51eda38e6e64c7b4d4622fbfb48eaa62143740b
app/models/host.rb | ||
---|---|---|
unless Rails.env == "test"
|
||
# Disallow any auto signing for our host.
|
||
GW::Puppetca.disable name unless puppetca? or not Setting[:manage_puppetca]
|
||
GW::Tftp.remove mac unless respond_to?(:tftp?) and tftp?
|
||
GW::Tftp.remove mac if SETTINGS[:unattended] and not (respond_to?(:tftp?) and tftp?)
|
||
end
|
||
self.save
|
||
rescue => e
|
||
... | ... | |
clearReports
|
||
|
||
# ensures that the legacy TFTP code is not called when using a smart proxy.
|
||
unless respond_to?(:tftp?) and tftp?
|
||
if SETTINGS[:unattended] and not (respond_to?(:tftp?) and tftp?)
|
||
return false unless GW::Tftp.create([mac, os.to_s.gsub(" ","-"), arch.name, serial])
|
||
end
|
||
|
Also available in: Unified diff
fixes #1376 - Unattended installation without TFTP integration