Code

changed config files
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 14:15:35 +0000 (14:15 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 14:15:35 +0000 (14:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8826 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/client/events/corefunctions.pm
gosa-si/gosa-si-bus
gosa-si/gosa-si-client
gosa-si/gosa-si-server
gosa-si/modules/ArpHandler.pm
gosa-si/modules/GosaPackages.pm
gosa-si/modules/SIPackages.pm
gosa-si/server.conf

index d68f981600be5b6cb38e29de32446b03e59afdf1..b52677f4a6af7bb0cc6fcb747222995cd35d0084 100644 (file)
@@ -16,14 +16,12 @@ my ($ldap_enabled, $ldap_config, $pam_config, $nss_config, $fai_logpath);
 
 
 my %cfg_defaults = (
-    "general" => {
-        "fai_logpath" => [\$fai_logpath, "/var/log/fai/fai.log"],
-    },
     "client" => {
         "ldap" => [\$ldap_enabled, 1],
         "ldap_config" => [\$ldap_config, "/etc/ldap/ldap.conf"],
         "pam_config" => [\$pam_config, "/etc/pam_ldap.conf"],
         "nss_config" => [\$nss_config, "/etc/libnss_ldap.conf"],
+        "fai_logpath" => [\$fai_logpath, "/var/log/fai/fai.log"],
     },
 );
 
@@ -449,7 +447,7 @@ sub detect_hardware {
 
     &write_to_file('goto-hardware-detection-stop', $fai_logpath);
    
-    return &main::send_msg_hash2address(
+    return &main::send_msg_hash_to_target(
                &main::create_xml_hash("detected_hardware", $main::client_address, $main::server_address, $result),
                $main::server_address, 
                $main::server_key,
index 3b5aa2a0dda3609b049a40099863adbda7a822f8..f3a9b47d0841662e5f4ab5dcc5657740e1fce2e9 100755 (executable)
@@ -47,14 +47,14 @@ $foreground = 0 ;
 "general" => {
     "log_file" => [\$log_file, "/var/run/".$0.".log"],
     "pid_file" => [\$pid_file, "/var/run/".$0.".pid"],
-    "bus_known_server_file_name" => [\$bus_known_server_file_name, "/var/lib/gosa-si/gosa-si-bus_known_server.db"],
-    "bus_known_clients_file_name" => [\$bus_known_clients_file_name, "/var/lib/gosa-si/gosa-si-bus_known_clients.db"],
     },
-"GOsa-si-bus" => {
+"bus" => {
     "key"  => [\$bus_key, "secret-bus-password"],
     "ip"   => [\$bus_ip, "0.0.0.0"],
     "port" => [\$bus_port, "20080"],
-    }, 
+    "bus_known_server_file_name" => [\$bus_known_server_file_name, "/var/lib/gosa-si/gosa-si-bus_known_server.db"],
+    "bus_known_clients_file_name" => [\$bus_known_clients_file_name, "/var/lib/gosa-si/gosa-si-bus_known_clients.db"],
+   }, 
 );
 
 #=== FUNCTIONS = functions =====================================================
index c4b36fe63be3c3dd322e4801f5931c6b04fe86dd..b4d3a2e9f31fef10c9c73e1af6baff9d5dc3346f 100755 (executable)
@@ -64,21 +64,21 @@ our $REGISTERED_FLAG = 1;
     "fai_logpath"         => [\$fai_logpath, "/var/log/fai/fai.log"],
     },
 "client" => 
-    {"client_port"        => [\$client_port, "20083"],
-     "client_ip"          => [\$client_ip, "0.0.0.0"],
-     "client_mac_address" => [\$client_mac_address, "00:00:00:00:00:00"],
+    {"port"        => [\$client_port, "20083"],
+     "ip"          => [\$client_ip, "0.0.0.0"],
+     "mac_address" => [\$client_mac_address, "00:00:00:00:00:00"],
+     "server_domain"       => [\$server_domain, ""],
      "ldap"               => [\$ldap_enabled, 1],
      "ldap_config"        => [\$ldap_config, "/etc/ldap/ldap.conf"],
      "pam_config"         => [\$pam_config, "/etc/pam_ldap.conf"],
      "nss_config"         => [\$nss_config, "/etc/libnss_ldap.conf"],
     },
-"server" =>
-    {"server_ip"          => [\$server_ip, "127.0.0.1"],
-    "server_port"         => [\$server_port, "20081"],
-    "server_key"          => [\$server_key, ""],
-    "server_timeout"      => [\$server_timeout, 10],
-    "server_domain"       => [\$server_domain, ""],
-    "server_key_lifetime" => [\$server_key_lifetime, 600], 
+"server" => {
+    "ip"          => [\$server_ip, "127.0.0.1"],
+    "port"         => [\$server_port, "20081"],
+    "key"          => [\$server_key, ""],
+    "timeout"      => [\$server_timeout, 10],
+    "key_lifetime" => [\$server_key_lifetime, 600], 
     },
 
 );
index 39fe6f815f4e581ff0eaa7c0018204a92aa4ed0f..7d66fb2effcf6594f5ce7f582dfa7c756f23ee08 100755 (executable)
@@ -47,21 +47,18 @@ use lib "/usr/lib/gosa-si/modules";
 
 my (%cfg_defaults, $foreground, $verbose, $ping_timeout);
 my ($bus, $msg_to_bus, $bus_cipher);
-my ($server, $server_mac_address, $server_events);
+my ($server, $server_mac_address);
 my ($gosa_server, $job_queue_timeout, $job_queue_table_name, $job_queue_file_name,$job_queue_loop_delay);
 my ($known_modules, $known_clients_file_name, $known_server_file_name);
-my ($max_clients);
 my ($pid_file, $procid, $pid, $log_file);
-my (%free_child, %busy_child, $child_max, $child_min, %child_alive_time, $child_timeout);
-my ($arp_activ, $arp_fifo, $arp_fifo_path);
+my ($arp_activ, $arp_fifo);
 my ($xml);
 
 # variables declared in config file are always set to 'our'
 our (%cfg_defaults, $log_file, $pid_file, 
-    $bus_activ, $bus_key, $bus_ip, $bus_port,
-    $server_activ, $server_ip, $server_port, $SIPackages_key, $max_clients,
-    $arp_activ, $arp_fifo_path,
-    $gosa_activ, $GosaPackages_key, $gosa_ip, $gosa_port, $gosa_timeout,
+    $server_ip, $server_port, $SIPackages_key, 
+    $arp_activ, 
+    $GosaPackages_key, $gosa_ip, $gosa_port, $gosa_timeout,
 );
 
 # additional variable which should be globaly accessable
@@ -97,43 +94,28 @@ our $known_server_db;
 # holds all registrated clients
 our $known_clients_db;
 
-%cfg_defaults =
-("general" =>
-    {"log_file" => [\$log_file, "/var/run/".$0.".log"],
+%cfg_defaults = (
+"general" => {
+    "log_file" => [\$log_file, "/var/run/".$0.".log"],
     "pid_file" => [\$pid_file, "/var/run/".$0.".pid"],
-    "child_max" => [\$child_max, 10],
-    "child_min" => [\$child_min, 3],
-    "child_timeout" => [\$child_timeout, 180],
-    "job_queue_timeout" => [\$job_queue_timeout, undef],
-    "job_queue_file_name" => [\$job_queue_file_name, '/var/lib/gosa-si/gosa-si-server_jobs.db'],
-    "job_queue_loop_delay" => [\$job_queue_loop_delay, 3],
+    },
+"server" => {
+#    "ip" => [\$server_ip, "0.0.0.0"],
+    "port" => [\$server_port, "20081"],
     "known_clients_file_name" => [\$known_clients_file_name, '/var/lib/gosa-si/gosa-si-server_known_clients.db' ],
     "known_server_file_name" => [\$known_server_file_name, '/var/lib/gosa-si/gosa-si-server_known_server.db'],
-   },
-"bus" =>
-    {"bus_activ" => [\$bus_activ, "on"],
-    "bus_passwd" => [\$bus_key, ""],
-    "bus_ip" => [\$bus_ip, "0.0.0.0"],
-    "bus_port" => [\$bus_port, "20080"],
     },
-"server" =>
-    {"server_activ" => [\$server_activ, "on"],
-    "server_ip" => [\$server_ip, "0.0.0.0"],
-    "server_port" => [\$server_port, "20081"],
-    "SIPackages_key" => [\$SIPackages_key, "none"],
-    "max_clients" => [\$max_clients, 100],
-    },
-"arp" =>
-    {"arp_activ" => [\$arp_activ, "on"],
-    "arp_fifo_path" => [\$arp_fifo_path, "/var/run/gosa-si/arp-notify"],
+"GOsaPackages" => {
+    "ip" => [\$gosa_ip, "0.0.0.0"],
+    "port" => [\$gosa_port, "20082"],
+    "job_queue_file_name" => [\$job_queue_file_name, '/var/lib/gosa-si/gosa-si-server_jobs.db'],
+    "job_queue_loop_delay" => [\$job_queue_loop_delay, 3],
+    "key" => [\$GosaPackages_key, "none"],
     },
-"gosa" =>
-    {"gosa_activ" => [\$gosa_activ, "on"],
-    "gosa_ip" => [\$gosa_ip, "0.0.0.0"],
-    "gosa_port" => [\$gosa_port, "20082"],
-    "GosaPackages_key" => [\$GosaPackages_key, "none"],
+"SIPackages" => {
+    "key" => [\$SIPackages_key, "none"],
     },
-    );
+);
 
 
 #===  FUNCTION  ================================================================
@@ -524,6 +506,11 @@ sub input_from_unknown_host {
 
        while( my ($mod, $info) = each(%act_modules)) {
         # check a key exists for this module
+
+
+print STDERR "SIPackages_key:$SIPackages_key\n";
+
+
         my $module_key = ${$mod."_key"};
         if( ! $module_key ) {
             daemon_log("ERROR: no key specified in config file for $mod", 1);
@@ -988,7 +975,7 @@ sub client_input {
 sub trigger_db_loop {
 #      my ($kernel) = $_[KERNEL];
        my ($kernel) = @_ ;
-       $kernel->delay_set('watch_for_new_jobs',3);
+       $kernel->delay_set('watch_for_new_jobs', $job_queue_loop_delay);
 }
 
 
index 44a74978be93efeed71655c3ff80d48cc523b812..edce8575144c1d006d3064a1fba942ba11c9d1ff 100644 (file)
@@ -89,9 +89,6 @@ sub read_configfile {
 sub get_module_info {
        my @info = (undef,
                undef,
-               undef,
-               undef,
-               "socket",
        );
 
        &read_configfile();
index d23b658e3950f41bc00b57263b51e6b8d9560729..22bf48d7bdaeaa0b2962e0c5e0fdfc352ce99363 100644 (file)
@@ -19,36 +19,25 @@ use lib "/usr/lib/gosa-si/server/events";
 BEGIN{}
 END{}
 
-my ($server_activ, $server_ip, $server_mac_address, $server_port, $server_passwd, $max_clients, $server_event_dir);
-my ($bus_activ, $bus_passwd, $bus_ip, $bus_port);
-my ($gosa_activ, $gosa_ip, $gosa_mac_address, $gosa_port, $gosa_passwd, $network_interface);
+my ($server_ip, $server_mac_address, $server_port, $server_passwd, $max_clients);
+my ($gosa_ip, $gosa_mac_address, $gosa_port, $gosa_passwd, $network_interface);
 my ($job_queue_timeout, $job_queue_file_name);
 
 my $gosa_server;
 my $event_hash;
 
-my %cfg_defaults = 
-("general" =>
-    {"job_queue_file_name" => [\$job_queue_file_name, '/var/lib/gosa-si/jobs.db'],
-    },
-"server" =>
-    {"server_activ" => [\$server_activ, "on"],
-    "server_ip" => [\$server_ip, "0.0.0.0"],
-    "server_port" => [\$server_port, "20081"],
-    "server_passwd" => [\$server_passwd, ""],
+my %cfg_defaults = (
+"server" => {
+    "ip" => [\$server_ip, "0.0.0.0"],
+    "port" => [\$server_port, "20081"],
+    "key" => [\$server_passwd, ""],
     "max_clients" => [\$max_clients, 100],
     },
-"bus" =>
-    {"bus_activ" => [\$bus_activ, "on"],
-    "bus_passwd" => [\$bus_passwd, ""],
-    "bus_ip" => [\$bus_ip, "0.0.0.0"],
-    "bus_port" => [\$bus_port, "20080"],
-    },
-"gosa" =>
-    {"gosa_activ" => [\$gosa_activ, "on"],
-    "gosa_ip" => [\$gosa_ip, "0.0.0.0"],
-    "gosa_port" => [\$gosa_port, "20082"],
-    "gosa_passwd" => [\$gosa_passwd, "none"],
+"GOsaPackages" => {
+    "ip" => [\$gosa_ip, "0.0.0.0"],
+    "port" => [\$gosa_port, "20082"],
+    "key" => [\$gosa_passwd, "none"],
+    "job_queue_file_name" => [\$job_queue_file_name, '/var/lib/gosa-si/jobs.db'],
     },
 );
  
@@ -62,7 +51,6 @@ $gosa_mac_address= &get_mac($network_interface);
 
 # complete addresses
 my $server_address = "$server_ip:$server_port";
-my $bus_address = "$bus_ip:$bus_port";
 my $gosa_address = "$gosa_ip:$gosa_port";
 
 # create general settings for this module
@@ -78,9 +66,6 @@ my $xml = new XML::Simple();
 sub get_module_info {
     my @info = ($gosa_address,
                 $gosa_passwd,
-                $gosa_server,
-                $gosa_activ,
-                "socket",
                 );
     return \@info;
 }
index 1eff3a641c11bf8f2b53eec1f65a432e33bd9316..65be05af8d3515da1ff044029b9703d45efb6716 100644 (file)
@@ -21,8 +21,7 @@ use Net::DNS;
 BEGIN{}
 END {}
 
-my ($known_clients_file_name);
-my ($server_activ, $server_ip, $server_mac_address, $server_port, $SIPackages_key, $max_clients, $ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $server_interface);
+my ($server_ip, $server_mac_address, $server_port, $SIPackages_key, $max_clients, $ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $server_interface);
 my ($bus_activ, $bus_key, $bus_ip, $bus_port);
 my $server;
 my $network_interface;
@@ -30,25 +29,25 @@ my $no_bus;
 my (@ldap_cfg, @pam_cfg, @nss_cfg, $goto_admin, $goto_secret);
 
 
-my %cfg_defaults =
-(
-"server" =>
-    {"server_activ" => [\$server_activ, "on"],
-    "server_ip" => [\$server_ip, "0.0.0.0"],
-    "server_mac_address" => [\$server_mac_address, "00:00:00:00:00"],
-    "server_port" => [\$server_port, "20081"],
-    "SIPackages_key" => [\$SIPackages_key, ""],
-    "max_clients" => [\$max_clients, 100],
+my %cfg_defaults = (
+"bus" => {
+    "activ" => [\$bus_activ, "on"],
+    "key" => [\$bus_key, ""],
+    "ip" => [\$bus_ip, ""],
+    "port" => [\$bus_port, "20080"],
+    },
+"server" => {
+    "ip" => [\$server_ip, "0.0.0.0"],
+    "mac_address" => [\$server_mac_address, "00:00:00:00:00"],
+    "port" => [\$server_port, "20081"],
     "ldap_uri" => [\$ldap_uri, ""],
     "ldap_base" => [\$ldap_base, ""],
     "ldap_admin_dn" => [\$ldap_admin_dn, ""],
     "ldap_admin_password" => [\$ldap_admin_password, ""],
+    "max_clients" => [\$max_clients, 100],
     },
-"bus" =>
-    {"bus_activ" => [\$bus_activ, "on"],
-    "bus_passwd" => [\$bus_key, ""],
-    "bus_ip" => [\$bus_ip, ""],
-    "bus_port" => [\$bus_port, "20080"],
+"SIPackages" => {
+    "key" => [\$SIPackages_key, ""],
     },
 );
 
@@ -97,15 +96,11 @@ my $res = $main::known_server_db->add_dbentry( {table=>'known_server',
 sub get_module_info {
     my @info = ($server_address,
                 $SIPackages_key,
-                $server,
-                $server_activ,
-                "socket",
                 );
     return \@info;
 }
 
 
-
 sub do_wake {
         my $host    = shift;
         my $ipaddr  = shift || '255.255.255.255';
index 5ae3e923d39ca9df912b86050b0f38b4102a5041..601fcf2c0af108c8e0cebb2893e9489d1ffb4ed1 100644 (file)
@@ -1,29 +1,33 @@
 [general]
-log_file = /var/log/gosa-si-server.log
+log_file = /var/run/gosa-si-server.log
 pid_file = /var/run/gosa-si-server.pid
 
 [bus]
-bus_activ = on
-bus_passwd = secret-bus-password
-bus_ip = 10.89.1.31
-bus_port = 20080
+activ = on
+key = secret-bus-password
+ip = 127.0.0.1
+port = 20080
 
 [server]
-server_activ = on
-server_port = 20081
-SIPackages_key = secret-server-password
-max_clients = 5
-server_event_dir = /usr/lib/gosa-si/server/events
-ldap_uri = ldap://10.89.1.30
-ldap_base = o=Landeshauptstadt München,c=de
-ldap_admin_dn = cn=ldapadmin,o=Landeshauptstadt München,c=de
+port = 20081
+known_clients_file_name = /var/lib/gosa-si/gosa-si-server_known_clients.db
+known_server_file_name = /var/lib/gosa-si/gosa-si-server_known_server.db
+max_clients = 100
+ldap_uri = ldap://127.0.0.1
+ldap_base =
+ldap_admin_dn = 
 ldap_admin_password = tester
 
-[arp]
-arp_activ = on
-arp_interface = all
+[SIPackages]
+key = secret-server-password
 
-[gosa]
-gosa_activ = on
-GosaPackages_key = secret-gosa-password
+[ArpHandler]
+activ = on
+interface = all
+
+[GOsaPackages]
+activ = on
+key = secret-gosa-password
+job_queue_file_name = /var/lib/gosa-si/gosa-si-server_jobs.db
+job_queue_loop_delay = 3