File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -330,11 +330,26 @@ sub mount_device {
330
330
create_mount_point ($devnum );
331
331
create_pkrule ($devname , $devnum , $part );
332
332
333
- if (($part [1] eq ' ntfs' ) && (-x ' /usr/local/bin/ntfs-3g' )) {
333
+ # DISCUSS: should we inform user about missing
334
+ # mounting tools (i.e. blkid, ntfs-3g, mount.exfat-fuse)
335
+
336
+ # check if NTFS is actually exFAT
337
+ if ($part [1] eq ' ntfs' && -x ' /usr/local/sbin/blkid' ) {
338
+ if (System (" /usr/local/sbin/blkid $device | grep -q 'TYPE=\" exfat\" '" ) == 0) {
339
+ $part [1] = ' exfat' ;
340
+ }
341
+ }
342
+
343
+ if ($part [1] eq ' ntfs' && ' /usr/local/bin/ntfs-3g' ) {
334
344
$mount_cmd = " /usr/local/bin/ntfs-3g" ;
335
345
$mountopts = " $mountopts ,uid=$uid ,gid=$gid ,umask=077" ;
336
346
}
337
347
348
+ if ($part [1] eq ' exfat' && -x ' /usr/local/sbin/mount.exfat-fuse' ) {
349
+ $mount_cmd = " /usr/local/sbin/mount.exfat-fuse" ;
350
+ $mountopts = " uid=$uid ,gid=$gid ,umask=077,noatime" ;
351
+ }
352
+
338
353
my $trymount = ` $mount_cmd -o $mountopts $device $mountbase /$login /$devtype$devnum 2>&1` ;
339
354
if (length ($trymount ) != 0) {
340
355
system (" $trymount -o $mountopts ,ro $device $mountbase /$login /$devtype$devnum " );
You can’t perform that action at this time.
0 commit comments