summaryrefslogtreecommitdiffstats
path: root/perl-install/timezone.pm
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2015-02-08 21:33:24 +0000
committerColin Guthrie <colin@mageia.org>2015-02-08 21:33:46 +0000
commitf6d83149036c800310fb307b79a477c614141056 (patch)
treec0cc8b9031b7abf03e40486d46e6a33953c77c21 /perl-install/timezone.pm
parent2969bde783d7e815a9867fe323e17394369579aa (diff)
downloaddrakx-f6d83149036c800310fb307b79a477c614141056.tar
drakx-f6d83149036c800310fb307b79a477c614141056.tar.gz
drakx-f6d83149036c800310fb307b79a477c614141056.tar.bz2
drakx-f6d83149036c800310fb307b79a477c614141056.tar.xz
drakx-f6d83149036c800310fb307b79a477c614141056.zip
drakclock: Ensure that /etc/localtime is a symlink (mga#14888)
This is actually just a followup to d4be53b62 to use the wrapper symlinkf() function which seems a little bit neater (subjective) and to update NEWS file.
Diffstat (limited to 'perl-install/timezone.pm')
-rw-r--r--perl-install/timezone.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 98a33c368..ec252c603 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -64,8 +64,8 @@ sub write {
set_ntp_server($t->{ntp});
my $tz_prefix = get_timezone_prefix();
- unlink "$::prefix/etc/localtime" or log::l("unlinking $! failed");
- symlink ($tz_prefix . '/' . $t->{timezone}, "$::prefix/etc/localtime") or log::l("linking /etc/localtime failed");
+ eval { symlinkf($tz_prefix . '/' . $t->{timezone}, "$::prefix/etc/localtime") };
+ $@ and log::l("installing /etc/localtime failed");
setVarsInSh("$::prefix/etc/sysconfig/clock", {
ZONE => $t->{timezone},
UTC => bool2text($t->{UTC}),