From 04d195c1250210ae915e169b0f285d0267462e23 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Wed, 22 Apr 2015 17:12:42 -0700 Subject: [PATCH] adds fix for redhat to disable ntp restart due to dhcp ntp server updates --- spec/spec_helper_acceptance.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 38fe316d7..ac8a59cfd 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -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