From 9ff316b07c005c0e43e2a9f0546baa85a3abaaae Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Sun, 15 Feb 2015 12:54:28 +0100 Subject: Fix timezone dir install prefix prepending (broken symlink during installer mga#14888) --- perl-install/timezone.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm index ec252c603..cfbaf98a1 100644 --- a/perl-install/timezone.pm +++ b/perl-install/timezone.pm @@ -6,8 +6,10 @@ use strict; use common; use log; -sub get_timezone_prefix() { - my $prefix = $::testing ? '' : $::prefix; +sub get_timezone_prefix { + my ($b_use_system_prefix) = @_; + + my $prefix = ($::testing || $b_use_system_prefix) ? '' : $::prefix; $prefix . "/usr/share/zoneinfo"; } @@ -63,7 +65,7 @@ sub write { set_ntp_server($t->{ntp}); - my $tz_prefix = get_timezone_prefix(); + my $tz_prefix = get_timezone_prefix(1); eval { symlinkf($tz_prefix . '/' . $t->{timezone}, "$::prefix/etc/localtime") }; $@ and log::l("installing /etc/localtime failed"); setVarsInSh("$::prefix/etc/sysconfig/clock", { -- cgit v1.2.1