From 9a93db94b0d4a052c964cedea738524ec3be3b3b Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 13 Jun 2007 20:35:38 +0000 Subject: * fixed all warnings indicated by 'perl -w' git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1162 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/devel-tools/test-config-db.pl | 2 +- config-db/slxconfig | 8 ++++---- config-db/slxconfig-demuxer | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'config-db') diff --git a/config-db/devel-tools/test-config-db.pl b/config-db/devel-tools/test-config-db.pl index c0d73d53..8a572e28 100755 --- a/config-db/devel-tools/test-config-db.pl +++ b/config-db/devel-tools/test-config-db.pl @@ -129,7 +129,7 @@ $metaDB->schemaChangeColumns('test2', 'descr' => 'description:s.30' }, $colDescrs); -my @rows = $metaDB->_doSelect("SELECT * FROM test2"); +@rows = $metaDB->_doSelect("SELECT * FROM test2"); foreach my $row (@rows) { foreach my $r (keys %$row) { print "$r = $row->{$r}\n"; diff --git a/config-db/slxconfig b/config-db/slxconfig index d8c90e42..fe70e48b 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -295,7 +295,7 @@ sub addClientToConfigDB my $clientID = $openslxDB->addClient([$clientData]); vlog 0, _tr("client '%s' has been successfully added to DB (ID=%s)\n", $clientName, $clientID); - if (defined @systemIDs) { + if (@systemIDs) { $openslxDB->addSystemIDsToClient($clientID, \@systemIDs); } if ($verbose) { @@ -374,7 +374,7 @@ sub addSystemToConfigDB my $systemID = $openslxDB->addSystem([$systemData]); vlog 0, _tr("system '%s' has been successfully added to DB (ID=%s)\n", $systemName, $systemID); - if (defined @clientIDs) { + if (@clientIDs) { $openslxDB->addClientIDsToSystem($systemID, \@clientIDs); } if ($verbose) { @@ -450,7 +450,7 @@ sub changeClientInConfigDB $openslxDB->changeClient($client->{id}, [$clientData]); vlog 0, _tr("client '%s' has been successfully changed\n", $clientName); - if (defined @systemIDs) { + if (@systemIDs) { $openslxDB->setSystemIDsOfClient($client->{id}, \@systemIDs); } if ($verbose) { @@ -520,7 +520,7 @@ sub changeSystemInConfigDB } $openslxDB->changeSystem($system->{id}, [$systemData]); vlog 0, _tr("system '%s' has been successfully changed\n", $systemName); - if (defined @clientIDs) { + if (@clientIDs) { $openslxDB->setClientIDsOfSystem($system->{id}, \@clientIDs); } if ($verbose) { diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index 043a082d..a5cd3d68 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -130,7 +130,7 @@ END { unlockScript($lockFile); } writeConfigurations(); my $wr = ($dryRun ? "would have written" : "wrote"); -print "$wr $systemConfCount systems and $clientSystemConfCount client-specific configurations to $tftpbootPath/client-config\n"; +print "$wr $systemConfCount system- and $clientSystemConfCount client-specific configurations to $tftpbootPath/client-config\n"; $openslxDB->disconnect(); @@ -172,6 +172,8 @@ sub unlockScript my $lockFile = shift; return if $dryRun; + + close(LOCKFILE); unlink $lockFile; } -- cgit v1.2.3-55-g7522