summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps.pm
diff options
context:
space:
mode:
authorDavid Walser <luigiwalser@mageia.org>2013-11-17 19:00:07 +0000
committerColin Guthrie <colin@mageia.org>2013-11-17 20:41:41 +0000
commitd54857e5704e52bc93d810250732affc82e1d65f (patch)
treefbaccf45e44d72d4facdd803a1279baa66c14618 /perl-install/install/steps.pm
parent6298fe9b2ec4be3c8845a0ab39c90ad76ea7a49e (diff)
downloaddrakx-d54857e5704e52bc93d810250732affc82e1d65f.tar
drakx-d54857e5704e52bc93d810250732affc82e1d65f.tar.gz
drakx-d54857e5704e52bc93d810250732affc82e1d65f.tar.bz2
drakx-d54857e5704e52bc93d810250732affc82e1d65f.tar.xz
drakx-d54857e5704e52bc93d810250732affc82e1d65f.zip
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
Diffstat (limited to 'perl-install/install/steps.pm')
-rw-r--r--perl-install/install/steps.pm9
1 files changed, 8 insertions, 1 deletions
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});