Code

update: si-server send syslog information to registering client
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Aug 2008 08:51:17 +0000 (08:51 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Aug 2008 08:51:17 +0000 (08:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12272 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/client/events/corefunctions.pm
gosa-si/modules/ClientPackages.pm
gosa-si/tests/client.php

index acf03be3c4cf640ae7be602f17ab275a7ef5752c..35faf0bc3745cbba79d6aa342591734f61690fe6 100644 (file)
@@ -206,7 +206,7 @@ sub new_syslog_config {
 
     # Restart syslog deamon
     my $res = qx(/etc/init.d/sysklogd restart);
-    &main::daemon_log("INFO: restart syslog daemon: \n$res", 5);
+    &main::daemon_log("INFO: restart syslog daemon: $res", 5);
 
     return;
 }
index b2a5288d635386cd1648cb083887a3dbebd87ebc..4b69675660732eef7304095320d3bba188811708 100644 (file)
@@ -516,12 +516,17 @@ sub here_i_am {
        }
 
     # Send client ntp server
-
     my $ntp_config_out = &new_ntp_config($mac_address, $session_id);
     if ($ntp_config_out) {
         push(@out_msg_l, $ntp_config_out);
     }
 
+    # Send client syslog server
+    my $syslog_config_out = &new_syslog_config($mac_address, $session_id);
+    if ($syslog_config_out) {
+        push(@out_msg_l, $syslog_config_out);
+    }
+
     # notify registered client to all other server
     my %mydata = ( 'client' => $source, 'macaddress' => $mac_address);
     my $mymsg = &build_msg('new_foreign_client', $main::server_address, "KNOWN_SERVER", \%mydata);
index 8e3179e606740916f5d5a1da85f34f606f7a2f06..d54a28fa343ae139ed63206efd1389279eee23a0 100755 (executable)
@@ -142,7 +142,8 @@ for($count = 1; $count <= $zahl; $count++)
     #$data = "<xml> <header>gosa_opsi_set_product_properties</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>linux-cl-2.intranet.gonicus.de</hostId> <productId>firefox</productId> <item> <name>askbeforeinst</name> <value>false</value> </item> </xml>";
 
     # Get hardware inventory
-    #$data = "<xml> <header>gosa_opsi_get_client_hardware</header> <source>GOSA</source> <target>GOSA</target> <hostId>linux-cl-2.intranet.gonicus.de</hostId> </xml>";
+    $data = "<xml> <header>gosa_opsi_get_client_hardware</header> <source>GOSA</source> <target>GOSA</target> <hostId>linux-cl-2.intranet.gonicus.de</hostId> </xml>";
+    #$data = "<xml> <header>gosa_opsi_get_client_hardware</header> <source>GOSA</source> <target>GOSA</target> <hostId>der_neue.intranet.gonicus.de</hostId> </xml>";
     
     # Get software inventory
     #$data = "<xml> <header>gosa_opsi_get_client_software</header> <source>GOSA</source> <target>GOSA</target> <hostId>linux-cl-2.intranet.gonicus.de</hostId> </xml>";
@@ -200,7 +201,7 @@ for($count = 1; $count <= $zahl; $count++)
 
     ##############################
     # SYSLOG reload
-    $data = "<xml> <header>gosa_trigger_reload_syslog_config</header> <source>GOSA</source> <target>GOSA</target> <macaddress>00:01:6c:9d:b9:fa</macaddress> </xml>"; 
+    #$data = "<xml> <header>gosa_trigger_reload_syslog_config</header> <source>GOSA</source> <target>GOSA</target> <macaddress>00:01:6c:9d:b9:fa</macaddress> </xml>"; 
 
     $sock->write($data);
     $answer = "nothing";