Skip to content

Commit

Permalink
adds fix for redhat to disable ntp restart due to dhcp ntp server upd…
Browse files Browse the repository at this point in the history
…ates
  • Loading branch information
bmjen committed Apr 23, 2015
1 parent 94ccfd2 commit 04d195c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@
on host, puppet('module install puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
end

#Need to disable update of ntp servers from DHCP, as subsequent restart of ntp causes test failures
if fact('osfamily') == 'Debian'
shell('[[ -f /etc/dhcp/dhclient-exit-hooks.d/ntp ]] && rm /etc/dhcp/dhcp-exit-hooks.d/ntp', { :acceptable_exit_codes => [0, 1] })
shell('[[ -f /etc/dhcp3/dhclient-exit-hooks.d/ntp ]] && rm /etc/dhcp3/dhcp-exit-hooks.d/ntp', { :acceptable_exit_codes => [0, 1] })
elsif fact('osfamily') == 'RedHat'
shell('echo "PEERNTP=no" >> /etc/sysconfig/network', { :acceptable_exit_codes => [0, 1]})
end
end
end
Expand Down

0 comments on commit 04d195c

Please sign in to comment.