From: rettenbe Date: Tue, 5 Feb 2008 15:49:07 +0000 (+0000) Subject: add letters reboot, halt, reinstall and softupdate to gosa-si-server and gosa-si... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef5b8726f53be5a08edc20d92d58dca5efe334fb;p=gosa.git add letters reboot, halt, reinstall and softupdate to gosa-si-server and gosa-si-client git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8752 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/client.conf b/gosa-si/client.conf index 34c774338..18260f979 100644 --- a/gosa-si/client.conf +++ b/gosa-si/client.conf @@ -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] diff --git a/gosa-si/client/events/corefunctions.pm b/gosa-si/client/events/corefunctions.pm index 6cbdc1b5d..2dfdc8309 100644 --- a/gosa-si/client/events/corefunctions.pm +++ b/gosa-si/client/events/corefunctions.pm @@ -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) = @_ ; diff --git a/gosa-si/server/events/installation.pm b/gosa-si/server/events/installation.pm index a02c179ff..4c7502e7d 100644 --- a/gosa-si/server/events/installation.pm +++ b/gosa-si/server/events/installation.pm @@ -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/
gosa_reboot<\/header>/
reboot<\/header>/; + + return $msg; +} + + +sub halt { + my ($msg, $msg_hash) = @_; + $msg =~ s/
gosa_halt<\/header>/
halt<\/header>/; + + return $msg; +} + + +sub reinstall { + my ($msg, $msg_hash) = @_; + $msg =~ s/
gosa_reinstall<\/header>/
reinstall<\/header>/; + + return $msg; +} + + +sub softupdate { + my ($msg, $msg_hash) = @_; + $msg =~ s/
gosa_softupdate<\/header>/
softupdate<\/header>/; + + return $msg; +} + +1; diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index e48d08b98..3aecd1be9 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -30,7 +30,7 @@ if($sock->connected()){ #$data = "
gosa_query_jobdb
andgt0le5
"; #$data= "
gosa_query_jobdb
ping03
"; #$data= "
gosa_query_jobdb
ping05timestamp
"; -#$data= "
gosa_query_jobdb
"; +$data= "
gosa_query_jobdb
"; # count #$data = "
gosa_count_jobdb
"; @@ -39,7 +39,12 @@ if($sock->connected()){ #$data = "
gosa_clear_jobdb
"; # set gosa-si-client to 'activated' -$data = "
gosa_set_activated_for_installation
10.89.1.31:20083 127.0.0.1:20081
"; +#$data = "
gosa_set_activated_for_installation
10.89.1.31:20083 127.0.0.1:20081
"; + +#$data = "
gosa_reboot
10.89.1.31:20083 10.89.1.31:20081
"; +#$data = "
gosa_reinstall
10.89.1.31:20083 10.89.1.31:20081
"; +#$data = "
gosa_softupdate
10.89.1.31:20083 10.89.1.31:20081
"; +#$data = "
gosa_halt
10.89.1.31:20083 10.89.1.31:20081
"; $sock->write($data);