summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install')
-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});