Code

add letters reboot, halt, reinstall and softupdate to gosa-si-server and gosa-si...
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Feb 2008 15:49:07 +0000 (15:49 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Feb 2008 15:49:07 +0000 (15:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8752 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/client.conf
gosa-si/client/events/corefunctions.pm
gosa-si/server/events/installation.pm
gosa-si/tests/client.php

index 34c7743383254dab2680bdd829574c8d88070c74..18260f97904f17826e5b5fc77a1ecd9c5752b3e1 100644 (file)
@@ -3,7 +3,6 @@ log_file = /var/log/gosa-si-client.log
 pid_file = /var/run/gosa-si-client.pid
 
 [client]
-client_ip = 10.89.1.31
 client_port = 20083
 
 [server]
index 6cbdc1b5d161b94c40dc9a4f8d1cf8656c60d404..2dfdc8309fd141acdb2bcbadfbd8f1f74802afca 100644 (file)
@@ -1,7 +1,7 @@
 package corefunctions;
 use Exporter;
 @ISA = qw(Exporter);
-my @events = qw(get_events registered set_activated_for_installation new_ldap_config new_key generate_hw_digest detect_hardware);
+my @events = qw(get_events registered set_activated_for_installation new_ldap_config new_key generate_hw_digest detect_hardware reboot halt reinstall softupdate);
 @EXPORT = @events;
 
 use strict;
@@ -48,6 +48,36 @@ sub daemon_log {
 }
 
 
+sub reboot {
+    my ($msg, $msg_hash) = @_ ;
+    &main::daemon_log("got reboot-msg: $msg", 5);
+    return;
+}
+
+
+sub halt {
+    my ($msg, $msg_hash) = @_ ;
+
+    &main::daemon_log("got halt-msg: $msg", 5);
+    return;
+}
+
+
+sub reinstall {
+    my ($msg, $msg_hash) = @_ ;
+    &main::daemon_log("got reinstall-msg: $msg", 5);
+
+    return;
+}
+
+
+sub softupdate {
+    my ($msg, $msg_hash) = @_ ;
+    &main::daemon_log("got softupdate-msg: $msg", 5);
+
+    return;
+}
+
 
 sub registered {
     my ($msg, $msg_hash) = @_ ;
index a02c179ff90ef706e8faa1e690f48cb4e10b8f57..4c7502e7d6555a718f602e71afeae44a97fb5adf 100644 (file)
@@ -1,7 +1,7 @@
 package installation;
 use Exporter;
 @ISA = qw(Exporter);
-my @events = qw(get_events set_activated_for_installation );
+my @events = qw(get_events set_activated_for_installation reboot halt softupdate reinstall);
 @EXPORT = @events;
 
 use strict;
@@ -33,3 +33,36 @@ sub set_activated_for_installation {
 
     return $out_msg;
 }
+
+sub reboot {
+    my ($msg, $msg_hash) = @_;
+    $msg =~ s/<header>gosa_reboot<\/header>/<header>reboot<\/header>/;
+
+    return $msg;
+}
+
+
+sub halt {
+    my ($msg, $msg_hash) = @_;
+    $msg =~ s/<header>gosa_halt<\/header>/<header>halt<\/header>/;
+
+    return $msg;
+}
+
+
+sub reinstall {
+    my ($msg, $msg_hash) = @_;
+    $msg =~ s/<header>gosa_reinstall<\/header>/<header>reinstall<\/header>/;
+
+    return $msg;
+}
+
+
+sub softupdate {
+    my ($msg, $msg_hash) = @_;
+    $msg =~ s/<header>gosa_softupdate<\/header>/<header>softupdate<\/header>/;
+
+    return $msg;
+}
+
+1;
index e48d08b98888a20f178f7fe6057d47ee8ee145e1..3aecd1be9024b6d868f4ba93bc368ae39e9eac1f 100755 (executable)
@@ -30,7 +30,7 @@ if($sock->connected()){
 #$data = "<xml><header>gosa_query_jobdb</header><where><clause><connector>and</connector><phrase><operator>gt</operator><ROWID>0</ROWID></phrase><phrase><operator>le</operator><ROWID>5</ROWID></phrase></clause></where></xml>";
 #$data= "<xml><header>gosa_query_jobdb</header><where><clause><phrase><headertag>ping</headertag></phrase></clause></where><limit><from>0</from><to>3</to></limit></xml>";
 #$data= "<xml><header>gosa_query_jobdb</header><where><clause><phrase><headertag>ping</headertag></phrase></clause></where><limit><from>0</from><to>5</to></limit><orderby>timestamp</orderby></xml>";
-#$data= "<xml><header>gosa_query_jobdb</header></xml>";
+$data= "<xml><header>gosa_query_jobdb</header></xml>";
 
 # count
 #$data = "<xml> <header>gosa_count_jobdb</header></xml>";
@@ -39,7 +39,12 @@ if($sock->connected()){
 #$data = "<xml> <header>gosa_clear_jobdb</header> </xml>";
 
 # set gosa-si-client to 'activated'
-$data = "<xml> <header>gosa_set_activated_for_installation</header> <target>10.89.1.31:20083</target> <source>127.0.0.1:20081</source> </xml>";
+#$data = "<xml> <header>gosa_set_activated_for_installation</header> <target>10.89.1.31:20083</target> <source>127.0.0.1:20081</source> </xml>";
+
+#$data = "<xml> <header>gosa_reboot</header> <target>10.89.1.31:20083</target> <source>10.89.1.31:20081</source> </xml>";
+#$data = "<xml> <header>gosa_reinstall</header> <target>10.89.1.31:20083</target> <source>10.89.1.31:20081</source> </xml>";
+#$data = "<xml> <header>gosa_softupdate</header> <target>10.89.1.31:20083</target> <source>10.89.1.31:20081</source> </xml>";
+#$data = "<xml> <header>gosa_halt</header> <target>10.89.1.31:20083</target> <source>10.89.1.31:20081</source> </xml>";
 
 
     $sock->write($data);