Code

- cleaning gosa-si-server
authoropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 22 May 2010 16:44:14 +0000 (16:44 +0000)
committeropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 22 May 2010 16:44:14 +0000 (16:44 +0000)
- cleaning init
- adjusting copyright

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18633 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/debian/changelog
gosa-si/debian/copyright
gosa-si/debian/gosa-si-client.init
gosa-si/debian/gosa-si-server.init
gosa-si/gosa-si-server

index cb7d7bb41a83ee23c4eae454cab5cf496d86eb32..c12b49b6a5793cf0d6550ad2b576ba29fe38d33a 100644 (file)
@@ -1,5 +1,5 @@
-gosa-si (2.6.9-1) unstable; urgency=low
+gosa-si (2.6.10-1) unstable; urgency=low
 
   * Initial upload (Closes: #534303)
 
- -- Cajus Pollmeier <cajus@debian.org>  Tue, 31 Mar 2010 22:09:00 +0200
+ -- Benoit Mortier <benoit.mortier@opensides.be>  Sat, 22 May 2010 18:30:00 +0100
index a6b5666bfc6c7d1339f6b34f1beb60316f4a1f75..d7541c4f1644e3f8240e9e803c45029e10aa0d43 100644 (file)
@@ -5,7 +5,10 @@ It was downloaded from http://www.gosa-project.org
 
 Copyright: 
 
-    Copyright (C) 2001-2010 Cajus Pollmeier <pollmeier@gonicus.de>
+                       (c) 2007-2009 by Andreas Rettenberger <rettenberger@gonicus.de>
+                       (c) 2008-2010 by Cajus Pollmeier <pollmeier@gonicus.de>
+                       (c) 2008-2009 by Jan Wenzel <wenzel@gonicus.de>
+                       (c) 2010 by Benoit Mortier <benoit.mortier@opensides.be>
 
 License:
 
index 4bc3f209d69746dba72547ecacb143207bd57efc..f20f4d43da5968a98168c72837ecfa8ac74b040c 100644 (file)
@@ -35,11 +35,8 @@ start_client() {
        start-stop-daemon --start --quiet --pidfile ${PIDFILE_CLIENT} --name ${CLIENT} --startas ${DAEMON_CLIENT} -- $DEBUG
 }
 
-# to be rewritten ugly !!
 stop_client() {
        start-stop-daemon --stop --retry 5 --quiet --pidfile ${PIDFILE_CLIENT} --name ${CLIENT}
-#      kill `ps -C gosa-si-client -o pid=` > /dev/null 2>&1
-#      ! ps -C gosa-si-client -o pid= > /dev/null 2>&1
 }
 
 case "$1" in
index 94888ca815e1432c2769fe6e0c123ec20437151b..1656e13885b7abff7dbfc6b956c661e24c1cdd0b 100644 (file)
@@ -35,11 +35,8 @@ start_server() {
        start-stop-daemon --start --quiet --pidfile ${PIDFILE_SERVER} --name ${SERVER} --startas ${DAEMON_SERVER} -- $1 $DEBUG
 }
 
-# to be changed ugly
 stop_server() {
        start-stop-daemon --stop --retry 5 --quiet --pidfile ${PIDFILE_SERVER} --name ${SERVER}
-#kill `ps -C gosa-si-server -o pid=` > /dev/null 2>&1
-#      ! ps -C gosa-si-server -o pid= > /dev/null 2>&1
 }
 
 
index 895ca1edcd87d7a7edfe36d9ce6821629777109a..cd7c4bcb0ecf59721359c9a2f1ede5fa261eddad 100755 (executable)
@@ -277,7 +277,6 @@ my $messaging_file_name;
 our $client_fai_log_dir = "/var/log/fai"; 
 
 # queue which stores taskes until one of the $max_children children are ready to process the task
-#my @tasks = qw();
 my @msgs_to_decrypt = qw();
 my $max_children = 2;
 
@@ -650,23 +649,22 @@ sub password_check {
 #  DESCRIPTION:  handle tasks to be done before signal becomes active
 #===============================================================================
 sub sig_int_handler {
-    my ($signal) = @_;
+       my ($signal) = @_;
 
 #      if (defined($ldap_handle)) {
 #              $ldap_handle->disconnect;
 #      }
-    # TODO alle verbliebenden ldap verbindungen aus allen heaps beenden
+# TODO all ldap connections shoudl be closed
     
-    daemon_log("shutting down gosa-si-server", 1);
+       daemon_log("shutting down gosa-si-server", 1);
 
-               $global_kernel->yield(TCP_SERVER => 'shutdown');
+       # asking the poe kernel to shutdown the server
+       $global_kernel->yield(TCP_SERVER => 'shutdown');
 
-               # to be removed rather crude !!
-               #system("kill `ps -C gosa-si-server -o pid=`");
+       # removing the pidfile
+       $pid->remove or warn "Could not remove $pid_file\n";
 
-               $pid->remove or warn "Could not remove $pid_file\n";
-
-               exit(0);
+       exit(0);
 }
 $SIG{INT} = \&sig_int_handler;
 
@@ -1785,25 +1783,25 @@ sub process_task {
 }
 
 sub session_start {
-    my ($kernel) = $_[KERNEL];
-    $global_kernel = $kernel;
-    $kernel->yield('register_at_foreign_servers');
+       my ($kernel) = $_[KERNEL];
+       $global_kernel = $kernel;
+       $kernel->yield('register_at_foreign_servers');
        $kernel->yield('create_fai_server_db', $fai_server_tn );
        $kernel->yield('create_fai_release_db', $fai_release_tn );
        $kernel->sig(USR1 => "sig_handler");
        $kernel->sig(USR2 => "recreate_packages_db");
        $kernel->delay_set('watch_for_new_jobs', $job_queue_loop_delay);
        $kernel->delay_set('watch_for_done_jobs', $job_queue_loop_delay); 
-    $kernel->delay_set('watch_for_modified_jobs', $modified_jobs_loop_delay); 
+       $kernel->delay_set('watch_for_modified_jobs', $modified_jobs_loop_delay);
        $kernel->delay_set('watch_for_new_messages', $messaging_db_loop_delay);
-    $kernel->delay_set('watch_for_delivery_messages', $messaging_db_loop_delay);
+       $kernel->delay_set('watch_for_delivery_messages', $messaging_db_loop_delay);
        $kernel->delay_set('watch_for_done_messages', $messaging_db_loop_delay);
-    $kernel->delay_set('watch_for_old_known_clients', $job_queue_loop_delay);
+       $kernel->delay_set('watch_for_old_known_clients', $job_queue_loop_delay);
 
-    # Start opsi check
-    if ($opsi_enabled eq "true") {
-        $kernel->delay_set('watch_for_opsi_jobs', $job_queue_opsi_delay); 
-    }
+       # Start opsi check
+       if ($opsi_enabled eq "true") {
+               $kernel->delay_set('watch_for_opsi_jobs', $job_queue_opsi_delay);
+       }
 
 }
 
@@ -3705,61 +3703,33 @@ daemon_log($server_status_hash->{$server_status}.": $server_revision", 1);
         # connect to incoming_db
         unlink($incoming_file_name);
         $incoming_db = ("GOsaSI::".$db_module)->new($incoming_file_name);
-                               #chmod(0640, $incoming_file_name);
-                               #chown($root_uid, $adm_gid, $incoming_file_name);
-        
+
         # connect to gosa-si job queue
         $job_db = ("GOsaSI::".$db_module)->new($job_queue_file_name);
-                               #chmod(0640, $job_queue_file_name);
-                               #chown($root_uid, $adm_gid, $job_queue_file_name);
         
         # connect to known_clients_db
-        #unlink($known_clients_file_name);
         $known_clients_db = ("GOsaSI::".$db_module)->new($known_clients_file_name);
-                               #chmod(0640, $known_clients_file_name);
-                               #chown($root_uid, $adm_gid, $known_clients_file_name);
         
         # connect to foreign_clients_db
-        #unlink($foreign_clients_file_name);
         $foreign_clients_db = ("GOsaSI::".$db_module)->new($foreign_clients_file_name);
-                               #chmod(0640, $foreign_clients_file_name);
-                               #chown($root_uid, $adm_gid, $foreign_clients_file_name);
         
         # connect to known_server_db
-                               #unlink($known_server_file_name);   # do not delete, gosa-si-server should be forced to check config file and dns at each start
         $known_server_db = ("GOsaSI::".$db_module)->new($known_server_file_name);
-                               #chmod(0640, $known_server_file_name);
-                               #chown($root_uid, $adm_gid, $known_server_file_name);
         
         # connect to login_usr_db
-        #unlink($login_users_file_name);
         $login_users_db = ("GOsaSI::".$db_module)->new($login_users_file_name);
-                               #chmod(0640, $login_users_file_name);
-                               #chown($root_uid, $adm_gid, $login_users_file_name);
         
         # connect to fai_server_db
-                               #unlink($fai_server_file_name);
         $fai_server_db = ("GOsaSI::".$db_module)->new($fai_server_file_name);
-                               #chmod(0640, $fai_server_file_name);
-                               #chown($root_uid, $adm_gid, $fai_server_file_name);
         
         # connect to fai_release_db
-                               #unlink($fai_release_file_name);
         $fai_release_db = ("GOsaSI::".$db_module)->new($fai_release_file_name);
-                               #chmod(0640, $fai_release_file_name);
-                               #chown($root_uid, $adm_gid, $fai_release_file_name);
         
         # connect to packages_list_db
-                               #unlink($packages_list_under_construction);
         $packages_list_db = ("GOsaSI::".$db_module)->new($packages_list_file_name);
-                               #chmod(0640, $packages_list_file_name);
-                               #chown($root_uid, $adm_gid, $packages_list_file_name);
         
         # connect to messaging_db
-        #unlink($messaging_file_name);
         $messaging_db = ("GOsaSI::".$db_module)->new($messaging_file_name);
-                               #chmod(0640, $messaging_file_name);
-                               #chown($root_uid, $adm_gid, $messaging_file_name);
     }
 }