From d54857e5704e52bc93d810250732affc82e1d65f Mon Sep 17 00:00:00 2001 From: David Walser Date: Sun, 17 Nov 2013 19:00:07 +0000 Subject: Add chrony support to drakclock mga#11092 v2 (by Colin Guthrie) * Fix external variable reference (my -> our + $ when using it) * Drop systemd cgroup filesystem check as the path has changed now (prefer "systemctl is-active foo.service" instead) * Add iburst to chrony config server definitions (triggers sync at startup) * Don't use ntpdate with chrony - rather chronyc waitsync * Don't bother checking for ntp in finish-install - just use chrony --- perl-install/install/steps.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install/install') diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm index 58236da2e..f51d50729 100644 --- a/perl-install/install/steps.pm +++ b/perl-install/install/steps.pm @@ -689,7 +689,14 @@ sub configureTimezone { my ($o) = @_; install::any::preConfigureTimezone($o); - $o->pkg_install('ntp') if $o->{timezone}{ntp}; + if ($o->{timezone}{ntp}) { + # We prefer chrony, but we'll deal with ntpd for the sake of upgrades + my $pkg = install::pkgs::packageByName($o->{packages}, 'chrony'); + unless ($pkg && $pkg->flag_installed) { + $pkg = install::pkgs::packageByName($o->{packages}, 'ntp'); + $o->pkg_install('chrony') unless ($pkg && $pkg->flag_installed); + } + } require timezone; timezone::write($o->{timezone}); -- cgit v1.2.1