summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b394dd6)
raw | patch | inline | side by side (parent: b394dd6)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Aug 2008 12:19:33 +0000 (12:19 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Aug 2008 12:19:33 +0000 (12:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12135 594d385d-05f5-0310-b6e9-bd551577e9d8
index f5be2bf0255cfc0b510dab4025f6ffcb0a48b763..2b7c27d68e94fe0f4afbc79d3d0f673704b1c1db 100644 (file)
);
&GOSA::GosaSupportDaemon::read_configfile($main::config_file, %cfg_defaults);
+
## @method get_events()
# A brief function returning a list of functions which are exported by importing the module.
# @return List of all provided functions
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index aaf2b5e006c121506ae52000699a9035d02e482a..2f224016e2d92408e090ab500892eb190d773533 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
# RETURNS: nothing
# DESCRIPTION: read cfg_file and set variables
#===============================================================================
-sub read_configfile {
- my $cfg;
- if( defined( $cfg_file) && ( (-s $cfg_file) > 0 )) {
- if( -r $cfg_file ) {
- $cfg = Config::IniFiles->new( -file => $cfg_file );
- } else {
- print STDERR "Couldn't read config file!\n";
- }
- } else {
- $cfg = Config::IniFiles->new() ;
- }
- foreach my $section (keys %cfg_defaults) {
- foreach my $param (keys %{$cfg_defaults{ $section }}) {
- my $pinfo = $cfg_defaults{ $section }{ $param };
- ${@$pinfo[ 0 ]} = $cfg->val( $section, $param, @$pinfo[ 1 ] );
- }
- }
-}
+#sub read_configfile {
+# my $cfg;
+# if( defined( $cfg_file) && ( (-s $cfg_file) > 0 )) {
+# if( -r $cfg_file ) {
+# $cfg = Config::IniFiles->new( -file => $cfg_file );
+# } else {
+# print STDERR "Couldn't read config file!\n";
+# }
+# } else {
+# $cfg = Config::IniFiles->new() ;
+# }
+# foreach my $section (keys %cfg_defaults) {
+# foreach my $param (keys %{$cfg_defaults{ $section }}) {
+# my $pinfo = $cfg_defaults{ $section }{ $param };
+# ${@$pinfo[ 0 ]} = $cfg->val( $section, $param, @$pinfo[ 1 ] );
+# }
+# }
+#}
#=== FUNCTION ================================================================
# read and set config parameters
&check_cmdline_param ;
-&read_configfile;
+&read_configfile($cfg_file, %cfg_defaults);
&check_pid;
$SIG{CHLD} = 'IGNORE';
index a0a173a0b05d16082d4fb0c6f4d68102fbf37a63..c64264a1be58127c66af8db8ccaf988bf967719e 100644 (file)
### START #####################################################################
# read configfile and import variables
-&read_configfile();
+&local_read_configfile();
# if server_ip is not an ip address but a name
#=== FUNCTION ================================================================
-# NAME: read_configfile
+# NAME: local_read_configfile
# PARAMETERS: cfg_file - string -
# RETURNS: nothing
# DESCRIPTION: read cfg_file and set variables
#===============================================================================
-sub read_configfile {
+sub local_read_configfile {
my $cfg;
if( defined( $main::cfg_file) && ( (-s $main::cfg_file) > 0 )) {
if( -r $main::cfg_file ) {
index ae94225520dbe79d3449fec53d9d05e68e85c6b2..2427c8b7b7d8ae077026ba8daa9652b37bd254bb 100644 (file)
"is_local",
"run_as",
"inform_all_other_si_server",
+ "read_configfile",
);
@EXPORT = @functions;
use strict;
return;
}
+
+sub read_configfile {
+ my ($cfg_file, %cfg_defaults) = @_ ;
+ my $cfg;
+ if( defined( $cfg_file) && ( (-s $cfg_file) > 0 )) {
+ if( -r $cfg_file ) {
+ $cfg = Config::IniFiles->new( -file => $cfg_file );
+ } else {
+ print STDERR "Couldn't read config file!";
+ }
+ } else {
+ $cfg = Config::IniFiles->new() ;
+ }
+ foreach my $section (keys %cfg_defaults) {
+ foreach my $param (keys %{$cfg_defaults{ $section }}) {
+ my $pinfo = $cfg_defaults{ $section }{ $param };
+ ${@$pinfo[ 0 ]} = $cfg->val( $section, $param, @$pinfo[ 1 ] );
+ }
+ }
+}
+
+
1;
index ef0eb439890de44771373598b3a35fb703b55035..7de3c5a7c430304f2838c0601e268f3cc21aa674 100644 (file)
my $mesg;
my %cfg_defaults = (
-"server" => {
- "ldap-uri" => [\$ldap_uri, ""],
- "ldap-base" => [\$ldap_base, ""],
- "ldap-admin-dn" => [\$ldap_admin_dn, ""],
- "ldap-admin-password" => [\$ldap_admin_password, ""],
+ "server" => {
+ "ldap-uri" => [\$ldap_uri, ""],
+ "ldap-base" => [\$ldap_base, ""],
+ "ldap-admin-dn" => [\$ldap_admin_dn, ""],
+ "ldap-admin-password" => [\$ldap_admin_password, ""],
},
);
-&read_configfile($main::cfg_file, %cfg_defaults);
+&GOSA::GosaSupportDaemon::read_configfile($main::cfg_file, %cfg_defaults);
sub get_events {
}
-sub read_configfile {
- my ($cfg_file, %cfg_defaults) = @_;
- my $cfg;
-
- if( defined( $cfg_file) && ( (-s $cfg_file) > 0 )) {
- if( -r $cfg_file ) {
- $cfg = Config::IniFiles->new( -file => $cfg_file );
- } else {
- &main::daemon_log("ERROR: siTriggered.pm couldn't read config file!", 1);
- }
- } else {
- $cfg = Config::IniFiles->new() ;
- }
- foreach my $section (keys %cfg_defaults) {
- foreach my $param (keys %{$cfg_defaults{ $section }}) {
- my $pinfo = $cfg_defaults{ $section }{ $param };
- ${@$pinfo[0]} = $cfg->val( $section, $param, @$pinfo[1] );
- }
- }
-}
+#sub read_configfile {
+# my ($cfg_file, %cfg_defaults) = @_;
+# my $cfg;
+#
+# if( defined( $cfg_file) && ( (-s $cfg_file) > 0 )) {
+# if( -r $cfg_file ) {
+# $cfg = Config::IniFiles->new( -file => $cfg_file );
+# } else {
+# &main::daemon_log("ERROR: siTriggered.pm couldn't read config file!", 1);
+# }
+# } else {
+# $cfg = Config::IniFiles->new() ;
+# }
+# foreach my $section (keys %cfg_defaults) {
+# foreach my $param (keys %{$cfg_defaults{ $section }}) {
+# my $pinfo = $cfg_defaults{ $section }{ $param };
+# ${@$pinfo[0]} = $cfg->val( $section, $param, @$pinfo[1] );
+# }
+# }
+#}
sub reload_ldap_config {
index ff516f48ca4efdfc17a037b33cb921abc5bd9723..c97a879f9b8331f0e2352301e005e08fc26464ca 100755 (executable)
--- a/gosa-si/tests/client.php
+++ b/gosa-si/tests/client.php
########################
# DAK Debian Archive Kit
- #$data = "<xml> <header>gosa_get_dak_keyring</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> </xml>";
+ $data = "<xml> <header>gosa_get_dak_keyring</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> </xml>";
#$data = "<xml> <header>gosa_import_dak_key</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> </xml>";
- $data = "<xml> <header>gosa_remove_dak_key</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> </xml>";
+ #$data = "<xml> <header>gosa_remove_dak_key</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> </xml>";
$sock->write($data);
$answer = "nothing";