Stop also ntpd
For cases where there is already running ntpd instead of chronyd, we have to also stop ntpd to not block ntpdate. Change-Id: Ic075bc02665ae6c572aa72c13b09ed097f0fbdee Resolves: rhbz#1171588
This commit is contained in:
@@ -65,7 +65,15 @@ file { 'chrony_conf':
|
|||||||
}
|
}
|
||||||
|
|
||||||
exec { 'stop-chronyd':
|
exec { 'stop-chronyd':
|
||||||
command => '/usr/bin/systemctl stop chronyd.service',
|
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
||||||
|
command => 'systemctl stop chronyd.service',
|
||||||
|
onlyif => 'systemctl status chronyd.service'
|
||||||
|
}
|
||||||
|
|
||||||
|
# for cases where ntpd is running instead of default chronyd
|
||||||
|
service { 'ntpd':
|
||||||
|
ensure => stopped,
|
||||||
|
enable => false,
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'ntpdate':
|
exec { 'ntpdate':
|
||||||
@@ -85,5 +93,6 @@ Package['chrony'] ->
|
|||||||
Package['ntpdate'] ->
|
Package['ntpdate'] ->
|
||||||
File['chrony_conf'] ->
|
File['chrony_conf'] ->
|
||||||
Exec['stop-chronyd'] ->
|
Exec['stop-chronyd'] ->
|
||||||
|
Service['ntpd'] ->
|
||||||
Exec['ntpdate'] ->
|
Exec['ntpdate'] ->
|
||||||
Service['chronyd']
|
Service['chronyd']
|
||||||
|
|||||||
Reference in New Issue
Block a user