From 68351b61ad8fdc64cf66bb0f07ab83fad86b5c22 Mon Sep 17 00:00:00 2001 From: opensides Date: Sat, 15 May 2010 10:26:27 +0000 Subject: [PATCH] - Harmonised Sections to ba all caps git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18481 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/client.conf | 6 +++--- gosa-si/client.conf.pod | 8 ++++---- gosa-si/gosa-si-client | 18 +++++++++--------- gosa-si/gosa-si-client.conf.5 | 18 +++++++++--------- gosa-si/gosa-si-server | 4 ++-- gosa-si/gosa-si-server.conf.5 | 18 +++++++++--------- gosa-si/modules/DBsqlite.pm | 10 ++++++---- gosa-si/server.conf | 4 ++-- gosa-si/server.conf.pod | 4 ++-- 9 files changed, 46 insertions(+), 44 deletions(-) diff --git a/gosa-si/client.conf b/gosa-si/client.conf index bf2ebfcc8..7859d5e86 100644 --- a/gosa-si/client.conf +++ b/gosa-si/client.conf @@ -1,11 +1,11 @@ -[general] +[General] log-file = /var/log/gosa-si-client.log pid-file = /var/run/gosa-si-client.pid -[client] +[Client] fai-logpath = /var/log/fai/fai.log -[server] +[Server] key = secret-server-password #[krb5] diff --git a/gosa-si/client.conf.pod b/gosa-si/client.conf.pod index 6f5a2a3ad..3cf69c87f 100644 --- a/gosa-si/client.conf.pod +++ b/gosa-si/client.conf.pod @@ -10,7 +10,7 @@ The gosa-si-client.conf file defines all parameter GOsa-SI-client needs for runn =head1 DIRECTIVES -=head2 [general] +=head2 [General] =over 4 @@ -29,7 +29,7 @@ Defines the location for the opts file. =back -=head2 [client] +=head2 [Client] =over 4 @@ -80,7 +80,7 @@ Open a different fifo for system communication =back -=head2 [server] +=head2 [Server] =over 4 @@ -131,7 +131,7 @@ Please report any bugs, or post any suggestions, to the GOsa mailing list ) -Copyright (C) 2003-2009 GONICUS GmbH +Copyright (C) 2003-2010 GONICUS GmbH This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 2d6fe0715..d9c62845c 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -100,12 +100,12 @@ my $trigger_seen_messages_delay = 30; my $fai_log_dir = "/var/log/fai"; %cfg_defaults = ( -"general" => +"General" => {"log-file" => [\$log_file, "/var/run/".$prg.".log"], "pid-file" => [\$pid_file, "/var/run/".$prg.".pid"], "opts-file" => [\$opts_file, "/var/run/".$prg.".opts"], }, -"client" => +"Client" => {"port" => [\$client_port, "20083"], "ip" => [\$client_ip, "0.0.0.0"], "mac-address" => [\$client_mac_address, "00:00:00:00:00:00"], @@ -118,7 +118,7 @@ my $fai_log_dir = "/var/log/fai"; "force-hostname" => [\$client_force_hostname, "false"], "system-com" => [\$system_com, "disabled"], }, -"server" => { +"Server" => { "ip" => [\$servers_string, "127.0.0.1"], "port" => [\$server_port, "20081"], "key" => [\$server_key, ""], @@ -197,9 +197,9 @@ sub check_pid { # create a syslog msg if it is not to possible to open PID file if (not sysopen(LOCK_FILE, $pid_file, O_WRONLY|O_CREAT|O_EXCL, 0644)) { - my($msg) = "Couldn't obtain lockfile '$pid_file' "; - if (open(my $LOCK_FILE, '<', $pid_file) - && ($pid = <$LOCK_FILE>)) + my($msg) = "Couldn't obtain lockfile '$pid_file' "; + if (open(my $LOCK_FILE2, '<', $pid_file) + && ($pid = <$LOCK_FILE2>)) { chomp($pid); $msg .= "(PID $pid)\n"; @@ -338,12 +338,12 @@ sub get_local_mac_for_remote_ip { if($server_ip =~ /^(\d\d?\d?\.){3}\d\d?\d?$/) { my $PROC_NET_ROUTE= ('/proc/net/route'); - open(my $PROC_NET_ROUTE, "<","$PROC_NET_ROUTE") + open(my $PROC_NET, "<","$PROC_NET_ROUTE") or die "Could not open $PROC_NET_ROUTE"; - my @ifs = <$PROC_NET_ROUTE>; + my @ifs = <$PROC_NET>; - close($PROC_NET_ROUTE); + close($PROC_NET); # Eat header line shift @ifs; diff --git a/gosa-si/gosa-si-client.conf.5 b/gosa-si/gosa-si-client.conf.5 index b87dc2113..a2ed938ae 100644 --- a/gosa-si/gosa-si-client.conf.5 +++ b/gosa-si/gosa-si-client.conf.5 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CLIENT.CONF 1" -.TH CLIENT.CONF 1 "2009-12-09" "perl v5.10.0" "User Contributed Perl Documentation" +.TH CLIENT.CONF 1 "2010-05-15" "perl v5.10.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -136,8 +136,8 @@ gosa\-si\-client.conf \- Configuration file for gosa\-si\-client. The gosa\-si\-client.conf file defines all parameter GOsa-SI-client needs for running and communication with GOsa-SI-server. It is normally located in the \fI/etc/gosa\-si/\fR directory and is generated automatically by the \fIgosa\-si\-client\fR\|(1) program during installation. .SH "DIRECTIVES" .IX Header "DIRECTIVES" -.SS "[general]" -.IX Subsection "[general]" +.SS "[General]" +.IX Subsection "[General]" .IP "log-file = /var/run/gosa\-si\-client.log" 4 .IX Item "log-file = /var/run/gosa-si-client.log" Defines the location for the log file. @@ -147,8 +147,8 @@ Defines the location for the pid file. .IP "opts-file = var/run/gosa\-si\-client.opts" 4 .IX Item "opts-file = var/run/gosa-si-client.opts" Defines the location for the opts file. -.SS "[client]" -.IX Subsection "[client]" +.SS "[Client]" +.IX Subsection "[Client]" .IP "port = 20083" 4 .IX Item "port = 20083" Defines the port GOsa-SI-client is listening for incoming messages. @@ -182,8 +182,8 @@ If set to true, client will try to get the hostname for registration from \f(CW$ .IP "system-com = disabled | enabled" 4 .IX Item "system-com = disabled | enabled" Open a different fifo for system communication -.SS "[server]" -.IX Subsection "[server]" +.SS "[Server]" +.IX Subsection "[Server]" .IP "ip = 127.0.0.1" 4 .IX Item "ip = 127.0.0.1" If set GOsa-SI-client is forced to register at specified GOsa-SI-Server. If it is not set, GOsa-SI tries to register at GOsa-SI-servers found in \s-1DNS\s0. @@ -214,7 +214,7 @@ Please report any bugs, or post any suggestions, to the GOsa mailing list ) .PP -Copyright (C) 2003\-2009 \s-1GONICUS\s0 GmbH +Copyright (C) 2003\-2010 \s-1GONICUS\s0 GmbH .PP This program is distributed in the hope that it will be useful, but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 1e56d7ce7..83ac36dfb 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -230,11 +230,11 @@ our $check_periodic = {"months"=>'', "weeks"=>'', "days"=>'', "hours"=>'', "minu %cfg_defaults = ( -"general" => { +"General" => { "log-file" => [\$log_file, "/var/run/".$prg.".log"], "pid-file" => [\$pid_file, "/var/run/".$prg.".pid"], }, -"server" => { +"Server" => { "ip" => [\$server_ip, "0.0.0.0"], "port" => [\$server_port, "20081"], "known-clients" => [\$known_clients_file_name, '/var/lib/gosa-si/clients.db' ], diff --git a/gosa-si/gosa-si-server.conf.5 b/gosa-si/gosa-si-server.conf.5 index 2d601f578..86e1f390e 100644 --- a/gosa-si/gosa-si-server.conf.5 +++ b/gosa-si/gosa-si-server.conf.5 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "SERVER.CONF 1" -.TH SERVER.CONF 1 "2009-10-02" "perl v5.10.0" "User Contributed Perl Documentation" +.TH SERVER.CONF 1 "2010-05-15" "perl v5.10.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -136,15 +136,15 @@ gosa\-si\-server.conf \- Configuration file for gosa\-si\-server. The gosa\-si\-server.conf file defines all parameter GOsa-SI-server needs for running. It is normally located in the /etc/gosa\-si/ directory and is generated automatically by the \fIgosa\-si\-server\fR\|(1) program during installation. .SH "DIRECTIVES" .IX Header "DIRECTIVES" -.SS "[general]" -.IX Subsection "[general]" +.SS "[General]" +.IX Subsection "[General]" .IP "logfile = /var/log/gosa\-si\-server.log" 4 .IX Item "logfile = /var/log/gosa-si-server.log" Defines the location for the log file. .IP "pid-file = /var/run/gosa\-si\-server.pid Defines the location for the pid file." 4 .IX Item "pid-file = /var/run/gosa-si-server.pid Defines the location for the pid file." -.SS "[server]" -.IX Subsection "[server]" +.SS "[Server]" +.IX Subsection "[Server]" .PD 0 .IP "ip = 1.2.3.4" 4 .IX Item "ip = 1.2.3.4" @@ -258,7 +258,7 @@ the user is marked to be no longer logged in or the host is no longer running. .IX Subsection "[ServerPackages]" .IP "address =" 4 .IX Item "address =" -Comma seperated list of GOsa-si-servers (1.2.3.4:20081,9.8.7.6:123) in network where this SI-server should register. These given SI-servers extend the list of SI-servers found in \s-1DNS\s0. +Comma separated list of GOsa-si-servers (1.2.3.4:20081,9.8.7.6:123) in network where this SI-server should register. These given SI-servers extend the list of SI-servers found in \s-1DNS\s0. .IP "dns-lookup = true" 4 .IX Item "dns-lookup = true" Perform a \s-1DNS\s0 lookup for server registration @@ -273,7 +273,7 @@ Defines the password incoming ServerPackages messages should be encrypted. This Defines the lifetime in seconds of a GOsa-SI-server key. After expiring the key will be automatically renewed. .IP "job-synchronization-enabled = true" 4 .IX Item "job-synchronization-enabled = true" -Defines whether job queue informations are be shared with other GOsa-SI-server in network. +Defines whether job queue information are be shared with other GOsa-SI-server in network. .IP "synchronization-loog = 5" 4 .IX Item "synchronization-loog = 5" Defines in seconds after which time the job queue synchronization is being done. @@ -289,7 +289,7 @@ Space\- or comma-separated list of interfaces on which to start an ARP-Daemon. E .IX Subsection "[Opsi]" .IP "enabled = false" 4 .IX Item "enabled = false" -Defines wheter Opsi integration is being enabled or not. +Defines whether Opsi integration is being enabled or not. .IP "server = localhost" 4 .IX Item "server = localhost" Define the hostname of the Opsi server diff --git a/gosa-si/modules/DBsqlite.pm b/gosa-si/modules/DBsqlite.pm index 985963da4..0a2e7f7a1 100644 --- a/gosa-si/modules/DBsqlite.pm +++ b/gosa-si/modules/DBsqlite.pm @@ -3,12 +3,14 @@ package GOSA::DBsqlite; use strict; use warnings; -use Carp; -use DBI; -use GOSA::GosaSupportDaemon; + use Time::HiRes qw(usleep); use Data::Dumper; +use GOsaSI::GosaSupportDaemon; + use Fcntl qw/:DEFAULT :flock/; # import LOCK_* constants +use Carp; +use DBI; our $col_names = {}; @@ -118,7 +120,7 @@ sub unlock { sub create_table { my $self = shift; - if(not defined($self) or ref($self) ne 'GOSA::DBsqlite') { + if(not defined($self) or ref($self) ne 'GOsaSI::DBsqlite') { &main::daemon_log("0 ERROR: GOSA::DBsqlite::create_table was called static! Statement was '$self'!", 1); return; } diff --git a/gosa-si/server.conf b/gosa-si/server.conf index c4c0a3712..b8da24124 100644 --- a/gosa-si/server.conf +++ b/gosa-si/server.conf @@ -1,8 +1,8 @@ -[general] +[General] log-file = /var/log/gosa-si-server.log pid-file = /var/run/gosa-si-server.pid -[server] +[Server] max-clients = 100 ldap-uri = ldap://127.0.0.1 ldap-base = dc=your,dc=domain diff --git a/gosa-si/server.conf.pod b/gosa-si/server.conf.pod index 3bc87dbc2..a4159808e 100644 --- a/gosa-si/server.conf.pod +++ b/gosa-si/server.conf.pod @@ -11,7 +11,7 @@ The gosa-si-server.conf file defines all parameter GOsa-SI-server needs for runn =head1 DIRECTIVES -=head2 [general] +=head2 [General] =over 4 @@ -25,7 +25,7 @@ Defines the location for the pid file. =back -=head2 [server] +=head2 [Server] =over 4 -- 2.30.2