This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gothinclient. commit ef21704474f40b20eba2189a6846986d8aa479fc Author: Stefan Baur <X2Go-ML-1@baur-itcs.de> Date: Tue Nov 21 21:50:25 2017 +0100 usbmount/x2gousbmount: add support for (V)FAT, NTFS, HFS, HPFS and EXT* (via fuse-ext2) file systems. --- debian/changelog | 2 ++ usbmount/x2gousbmount | 41 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 02d54d8..347e1c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -89,6 +89,8 @@ x2gothinclient (1.5.0.0-0x2go1) UNRELEASED; urgency=low - Fix desktop/thinclient mode detection. Fixes: #1136. - Set default username to x2gothinclient for MATE minidesktop builds, even for X2GO TCE Live builds. + - Add support for (V)FAT, NTFS, HFS, HPFS and EXT* (via fuse-ext2) file + systems. [ Mark Pedersen-Cook ] * debian/po: diff --git a/usbmount/x2gousbmount b/usbmount/x2gousbmount index 12d8535..16fb86b 100755 --- a/usbmount/x2gousbmount +++ b/usbmount/x2gousbmount @@ -142,9 +142,46 @@ if ( check_x2gothinclientmode() || ( -x "/etc/x2go/x2gothinclient-minidesktop_st mkdir("/media/$name/$ldev"); # mount the USB device - if(system("mount $dev /media/$name/$ldev -o uid=$user,sync,uni_xlate")==0) + # sync is supported by all file systems + # uid is supported by vfat (via fat),ntfs,hfs,hpfs + # uni_xlate is supported by vfat,ntfs + # we must not trigger on iso9660 and udf, or else hybrid USB media + # would only cause a mount of the iso9660 raw device, + # blocking the mount of individual partitions + # real optical media ->x2gocdmanager/x2gothinclient-cdmanager package + if(system("mount -tvfat,ntfs $dev /media/$name/$ldev -o uid=$user,sync,uni_xlate")==0) { - syslog('notice', "USB device $name ($ldev) successfully mounted"); + syslog('notice', "USB device $name ($ldev) successfully mounted (probably vfat or ntfs)"); + # if mounted, inform x2goclient about it... + system("touch $mntdir/$ldev.mounted"); + open (D,">",expand_filename("~$user/export/$name.$ldev")); + print D "export=/media/$name/$ldev\n"; + close (D); + } + elsif(system("mount -t hfs $dev /media/$name/$ldev -o uid=$user,sync")==0) + { + syslog('notice', "USB device $name ($ldev) successfully mounted (hfs detected)"); + # if mounted, inform x2goclient about it... + system("touch $mntdir/$ldev.mounted"); + open (D,">",expand_filename("~$user/export/$name.$ldev")); + print D "export=/media/$name/$ldev\n"; + close (D); + } + elsif(system("mount -t hpfs $dev /media/$name/$ldev -o uid=$user,sync")==0) + { + syslog('notice', "USB device $name ($ldev) successfully mounted (hpfs detected)"); + # if mounted, inform x2goclient about it... + system("touch $mntdir/$ldev.mounted"); + open (D,">",expand_filename("~$user/export/$name.$ldev")); + print D "export=/media/$name/$ldev\n"; + close (D); + } + # We use fuseext2 for read-only EXT* mounts since this driver does not + # check the usual file permission hierarchy and allows (read-only) + # access to any file on the file system. + elsif(system("fuseext2 $dev /media/$name/$ldev -o ro")==0) + { + syslog('notice', "USB device $name ($ldev) successfully mounted readonly (ext*fs detected)"); # if mounted, inform x2goclient about it... system("touch $mntdir/$ldev.mounted"); open (D,">",expand_filename("~$user/export/$name.$ldev")); -- Alioth's /srv/git/code.x2go.org/x2gothinclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gothinclient.git