[X2Go-Commits] x2gothinclient.git - master (branch) updated: 1.1.0.0-35-g6488c93

X2Go dev team git-admin at x2go.org
Fri Nov 22 14:54:36 CET 2013


The branch, master has been updated
       via  6488c9391b4b6b9e89fa6795f1d03a16d80a3dce (commit)
      from  637f3bd26cd45a1b152fb2bfbeae99aab3326c4a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6488c9391b4b6b9e89fa6795f1d03a16d80a3dce
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Nov 22 14:53:36 2013 +0100

    Add syslog support to x2gousbmount.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog          |    1 +
 x2gousbmount/x2gousbmount |   10 ++++++++++
 2 files changed, 11 insertions(+)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 6294a30..5e39712 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,7 @@ x2gothinclient (1.1.0.1-0~x2go1) UNRELEASED; urgency=low
       deprecated location /var/run).
     - Add TC_NONINTERACTIVE (commented out) to x2gothinclient_settings config
       file.
+    - Add syslog support to x2gousbmount.
   * debian/control:
     + New bin:package x2gothinclient-chroot.
     + Make sure x2gothinclient-chroot pulls in editing tools like
diff --git a/x2gousbmount/x2gousbmount b/x2gousbmount/x2gousbmount
index fcdb2e6..ccc1cfc 100755
--- a/x2gousbmount/x2gousbmount
+++ b/x2gousbmount/x2gousbmount
@@ -20,6 +20,10 @@
 
 use strict;
 use File::Path::Expand;
+use Sys::Syslog qw( :standard :macros );
+
+openlog($0,'cons,pid','user');
+setlogmask( LOG_UPTO(LOG_NOTICE) );
 
 sub check_x2gothinclientd {
 	my $x=`ps ax | grep x2gothinclient`;
@@ -68,6 +72,8 @@ if ( check_x2gothinclientd() )
 		### ACTION: mount device after it has been added to USB subsystem
 		###
 
+		syslog('notice', "device add action called");
+
 		# prepare mount points
 		mkdir("/media");
 		mkdir("/media/$name");
@@ -76,6 +82,7 @@ if ( check_x2gothinclientd() )
 		# mount the USB device
 		if(system("mount $dev /media/$name/$ldev -o uid=x2gothinclient,sync,uni_xlate")==0)
 		{
+			syslog('notice', "USB device $name ($ldev) successfully mounted");
 			# if mounted, inform x2goclient about it...
 			system("touch $mntdir/$ldev.mounted");
 			open (D,">",expand_filename("~x2gothinclient/export/$name.$ldev"));
@@ -120,6 +127,8 @@ if ( check_x2gothinclientd() )
 		### ACTION: unmount device after it has been removed from the USB subsystem
 		###
 
+		syslog('notice', "device remove action called");
+
 		# we rely on our own mount logistics here...
 		if ( -e "$mntdir/$ldev.mounted" )
 		{
@@ -129,6 +138,7 @@ if ( check_x2gothinclientd() )
 			open ( D,">",expand_filename("~x2gothinclient/export/$name.$ldev.unexport"));
 			print D "unexport=/media/$name/$ldev\n";
 			close (D);
+			syslog('notice', "USB device $name ($ldev) successfully unmounted");
 		}
 		elsif ( -e "$mntdir/$ldev.encrypted" )
 		{


hooks/post-receive
-- 
x2gothinclient.git (X2Go Thin Client Environment)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gothinclient.git" (X2Go Thin Client Environment).




More information about the x2go-commits mailing list