Code

- updated manpages for copyright years
[gosa.git] / gosa-si / gosa-si-client
index 0fb1c1be64c57c57e7536b2689b29752ce84618e..7e38a20830fc145430a63727192149d14df85b35 100755 (executable)
@@ -377,6 +377,12 @@ sub generate_hw_digest {
        foreach my $line (split /\n/, `cat /proc/bus/pci/devices`) {
                $hw_data.= sprintf "%s", $line =~ /[^\s]+\s([^\s]+)\s.*/;
        }
+        # linux-vserver has no /proc/bus/pci/devices 
+       if ( !$hw_data ) { 
+               foreach my $line (split /\n/, `ifconfig | grep HWaddr`) { 
+                       $hw_data.= sprintf "%s", $line =~ /[^\s]+\s([^\s]+)\s.*/; 
+               } 
+       } 
        return(md5_base64($hw_data));
 }
 
@@ -1067,6 +1073,7 @@ sub server_input {
 
                        # if client is alread in a registration process, that means not registered, do nothing
                        # if not, cause re-registration
+# TODO : This if-else can cause a registration deadlock. Currently I can not reproduce the deadlock and don't have a clue what is the reason for the deadlock
                        if (not $REGISTERED) {
                                &daemon_log("WARNING: gosa-si-client is already in a registration process so ignore this message", 3);
                        } else {
@@ -1282,10 +1289,10 @@ if( defined $server_check ) {
                        }
                }
                if (0 == @tmp_servers) {
-                       my $log_string = "no gosa-si-server found!";
-                       $log_string .= "\n\tdetermined domains out of /etc/resolv.conf: ".join(", ", @domain_list) if (@domain_list);
-                       $log_string .= "\n\tdetermined server addresses in domains: ".join(", ",@$tmp_domains) if (defined($tmp_domains));
-                       daemon_log("ERROR: $log_string", 1) if (defined($log_string));
+                        my $log_string = "no gosa-si-server found in DNS for domain: ".join(", ", @domain_list) if (@domain_list);
+                        my $log_string2 = "server addresses in domain: ".join(", ",@$tmp_domains) if (defined($tmp_domains));
+                        daemon_log("ERROR: $log_string", 1) if (defined($log_string));
+                        daemon_log("ERROR: $log_string2", 1) if (defined($log_string2));
                        daemon_log("ERROR: $error_string", 1) if (defined($error_string));
                        daemon_log("ERROR: please specify a gosa-si-server address or a domain in config file", 1);
                        kill 2, $$;
@@ -1309,13 +1316,13 @@ if( defined $server_check ) {
 
 # Open a new fifo for FAI messages to gosa-si-server
 if (-p $fai_com_fifo) { unlink $fai_com_fifo }
-POSIX::mkfifo("$fai_com_fifo", "0600");
+POSIX::mkfifo("$fai_com_fifo", 0600);
 
 # Open a new fifo for system communication, 
 if (-p $system_com_fifo) { unlink $system_com_fifo }
 if ($system_com eq "enabled") 
 { 
-       POSIX::mkfifo("$system_com_fifo", "0600"); 
+       POSIX::mkfifo("$system_com_fifo", 0600); 
 }
 
 POE::Session->create(