diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-11-29 23:29:16 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-11-30 10:19:49 +0000 |
commit | 3c568d7d1f55c44030329c816567c7daecdd1c9d (patch) | |
tree | a1843c33ec8ef427c5bbb21b71af01da666c4200 /perl-install | |
parent | dd94cd15d608a684a31f6b382809e001aacbf9bd (diff) | |
download | drakx-3c568d7d1f55c44030329c816567c7daecdd1c9d.tar drakx-3c568d7d1f55c44030329c816567c7daecdd1c9d.tar.gz drakx-3c568d7d1f55c44030329c816567c7daecdd1c9d.tar.bz2 drakx-3c568d7d1f55c44030329c816567c7daecdd1c9d.tar.xz drakx-3c568d7d1f55c44030329c816567c7daecdd1c9d.zip |
installer: write out the timezone for use by urpm::mirrors.
urpm::mirrors will use /etc/sysconfig/clock in the installer environment
when choosing the nearest mirror. So make that file available.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install/any.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 56502cddf..47809b240 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -135,6 +135,21 @@ sub preConfigureTimezone { my $utc = every { !isFat_or_NTFS($_) } @{$o->{fstab}}; my $ntp = timezone::ntp_server(); add2hash_($o->{timezone}, { UTC => $utc, ntp => $ntp }); + + #- Make the timezone available to urpm::mirrors. + write_installer_timezone($o->{timezone}); +} + +=item write_installer_timezone($timezone) + +Writes a minimal version of $timezone to /etc/sysconfig/clock for use by urpm::mirrors + +=cut + +sub write_installer_timezone { + my ($timezone) = @_; + mkdir_p('/etc/sysconfig/'); + setVarsInSh('/etc/sysconfig/clock', { ZONE => $timezone->{timezone} }); } =item ask_suppl_media_method($o) |