summaryrefslogtreecommitdiffstats
path: root/time_wizard
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-22 20:24:49 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-22 20:24:49 +0000
commitc39ce7aa14f2424c874cc58b5ce5249a05fabe66 (patch)
tree8893b894f4ac7fc7b2fe4dc116654b3830e88668 /time_wizard
parent568cc7c168e09ca61e6a6652ad0ab597fa5b6421 (diff)
downloaddrakwizard-c39ce7aa14f2424c874cc58b5ce5249a05fabe66.tar
drakwizard-c39ce7aa14f2424c874cc58b5ce5249a05fabe66.tar.gz
drakwizard-c39ce7aa14f2424c874cc58b5ce5249a05fabe66.tar.bz2
drakwizard-c39ce7aa14f2424c874cc58b5ce5249a05fabe66.tar.xz
drakwizard-c39ce7aa14f2424c874cc58b5ce5249a05fabe66.zip
perl_checker fixes
Diffstat (limited to 'time_wizard')
-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";