diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-01-04 23:42:26 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-01-04 23:42:26 +0100 |
commit | 8fe4923d0bd8d097d5403d1a7a5a52f185ac9c22 (patch) | |
tree | 0bb7371074980c9ec4fc56cf8f68f69e013db927 /lib/AdminPanel | |
parent | 8e76928c3751a4cd452debaeb9faeacfc37ca460 (diff) | |
download | manatools-8fe4923d0bd8d097d5403d1a7a5a52f185ac9c22.tar manatools-8fe4923d0bd8d097d5403d1a7a5a52f185ac9c22.tar.gz manatools-8fe4923d0bd8d097d5403d1a7a5a52f185ac9c22.tar.bz2 manatools-8fe4923d0bd8d097d5403d1a7a5a52f185ac9c22.tar.xz manatools-8fe4923d0bd8d097d5403d1a7a5a52f185ac9c22.zip |
/etc/localtime as link
Diffstat (limited to 'lib/AdminPanel')
-rw-r--r-- | lib/AdminPanel/Shared/TimeZone.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AdminPanel/Shared/TimeZone.pm b/lib/AdminPanel/Shared/TimeZone.pm index 9add8014..112610c2 100644 --- a/lib/AdminPanel/Shared/TimeZone.pm +++ b/lib/AdminPanel/Shared/TimeZone.pm @@ -451,9 +451,9 @@ sub writeConfiguration { # if we are going to use systemd then we have to remove the link only # if it is not a link, becuase it should be managed by systemd it self # eval { unlink '/etc/localtime' } unless -l '/etc/localtime'; -# eval { unlink '/etc/localtime' }; -# eval { symlink $tz, '/etc/localtime' }; - eval { File::copy($tz, '/etc/localtime') } ; + unlink '/etc/localtime' or Sys::Syslog::syslog('info|local1', "unlinking /etc/localtime failed"); + Sys::Syslog::syslog('info|local1', "Setting $tz as localtime"); + symlink $tz, '/etc/localtime' or Sys::Syslog::syslog('info|local1', "linking $tz to /etc/localtime failed"); my $adjtime_file = '/etc/adjtime'; my @adjtime = MDK::Common::File::cat_($adjtime_file); |