summaryrefslogtreecommitdiffstats
path: root/time_wizard/Ntp.pm
diff options
context:
space:
mode:
Diffstat (limited to 'time_wizard/Ntp.pm')
-rw-r--r--time_wizard/Ntp.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/time_wizard/Ntp.pm b/time_wizard/Ntp.pm
index 469f9c0a..4c45b2cf 100644
--- a/time_wizard/Ntp.pm
+++ b/time_wizard/Ntp.pm
@@ -53,7 +53,7 @@ my %ntp_servers = (
'ntp.cs.strath.ac.uk' => "Dept. Computer Science, Strathclyde University, Glasgow, Scotland",
'ntp.shim.org' => "Singapore",
'ntp.tmc.edu' => "Baylor College of Medicine, Houston, Tx",
-'ntp1.cmc.ec.gc.ca' =>"Canadian Meteorological Centre, Dorval, Quebec, Canada"
+'ntp1.cmc.ec.gc.ca' => "Canadian Meteorological Centre, Dorval, Quebec, Canada"
);
my %actions = (
@@ -68,7 +68,7 @@ if (-d '/usr/share/zoneinfo') {
foreach my $z (grep { /^[A-Z]/ } readdir $dir) {
if (-d "/usr/share/zoneinfo/$z") {
opendir my $dir2, "/usr/share/zoneinfo/$z";
- push @{$country{$z}}, map { "$_" } grep { /^[A-Z]/ } readdir $dir2;
+ push @{$country{$z}}, map { $_ } grep { /^[A-Z]/ } readdir $dir2;
closedir $dir2
} else {
$country{$z} = 1
@@ -169,7 +169,7 @@ $o->{pages} = {
};
sub new {
- my ($class, $conf) = @_;
+ my ($class) = @_;
bless {
o => $o,
}, $class;
@@ -178,7 +178,7 @@ sub new {
sub get_timezone {
-f "/etc/sysconfig/clock" or return;
my %conf = getVarsFromSh("/etc/sysconfig/clock");
- my ($c,$r) = split "/", $conf{ZONE};
+ my ($c, $r) = split "/", $conf{ZONE};
return ($conf{ZONE}, $c, $r)
}
@@ -196,6 +196,7 @@ sub do_it {
$::testing and return;
my $file = "/etc/sysconfig/clock";
MDK::Common::cp_af($file, $file.".orig");
+ local *NEW;
open(NEW, "> $file") or die "can not open $file: $!";
print NEW "UTC=true\n";
print NEW "ZONE=$o->{var}{wiz_timezone}\n";