summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a15f138)
raw | patch | inline | side by side (parent: a15f138)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 May 2008 15:25:28 +0000 (15:25 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 May 2008 15:25:28 +0000 (15:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10825 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index 6b7a3e3940d1d1824098ebb8d4f923ac039fd169..7330d128d4263c6fee1d3876f6a7651c02675705 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
# Workaround: need pure perl to make it work with UTF-8 :-(
$XML::Simple::PREFERRED_PARSER= "XML::SAX::PurePerl";
-my $client_version = "$HeadURL$:$Rev$";
+my $client_version = '$HeadURL$:$Rev$';
+my $client_headURL;
+my $client_revision;
+my $client_status;
my $event_dir = "/usr/lib/gosa-si/client/events";
use lib "/usr/lib/gosa-si/client/events";
&add_content2xml_hash($register_hash, "new_passwd", $server_key);
&add_content2xml_hash($register_hash, "mac_address", $local_mac);
&add_content2xml_hash($register_hash, "events", $events);
+ &add_content2xml_hash($register_hash, "client_status", $client_status);
+ &add_content2xml_hash($register_hash, "client_revision", $client_revision);
&add_content2xml_hash($register_hash, "gotoHardwareChecksum", $gotoHardwareChecksum);
# Add $HOSTNAME from ENV if force-hostname is set
$pid = fork;
setsid or die "Can't start a new session: $!";
umask 0;
-}
-else {
+} else {
$pid = $$;
}
};
}
+# parse head url and revision from svn
+my $client_status_hash = { 'developmental'=>'revision', 'stable'=>'release'};
+$client_version =~ /^\$HeadURL: (\S+) \$:\$Rev: (\d+) \$$/;
+$client_headURL = defined $1 ? $1 : 'unknown' ;
+$client_revision = defined $2 ? $2 : 'unknown' ;
+if ($client_headURL =~ /\/tag\// ||
+ $client_headURL =~ /\/branches\// ) {
+ $client_status = "stable";
+} else {
+ $client_status = "developmental" ;
+}
+
daemon_log(" ", 1);
daemon_log("$prg started!", 1);
+daemon_log("status: $client_status", 1);
+daemon_log($client_status_hash->{$client_status}.": $client_revision", 1);
# delete old DBsqlite lock files
system('rm -f /tmp/gosa_si_lock*gosa-si-client*');