Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / client / lufs / mount.captive.in
index 209e27c..3e0a47f 100755 (executable)
@@ -30,10 +30,10 @@ $vardir=~s#\$\Q{prefix}\E#'@prefix@';#ge;
 $vardir="/var/lib/captive" if $vardir=~/^@/;
 my $lufsd_bin='@PATH_LUFSD@';
 $lufsd_bin="/usr/bin/lufsd" if $lufsd_bin=~/^@/;
-my $captive_sandbox_server_bin='@sbindir@/captive-sandbox-server';
+my $captive_sandbox_server_bin='@libexecdir@/captive-sandbox-server';
 $captive_sandbox_server_bin=~s#\$\Q{exec_prefix}\E#'@exec_prefix@';#ge;
 $captive_sandbox_server_bin=~s#\$\Q{prefix}\E#'@prefix@';#ge;
-$captive_sandbox_server_bin="/usr/sbin/captive-sandbox-server" if $captive_sandbox_server_bin=~/^@/;
+$captive_sandbox_server_bin="/usr/libexec/captive-sandbox-server" if $captive_sandbox_server_bin=~/^@/;
 
 
 my $ME=($0=~m#([^/]*)$#)[0] or die "Cannot detetect my basename from: $0";
@@ -71,29 +71,30 @@ if (!-r $ntoskrnl) {
        die_install();
        }
 
-# Shameless advertisement:
-if ($fsname eq "ntfs") {
-       for my $fh (*STDERR,*STDOUT) {
-               if (-t $fh) {
-                       print $fh 'Captive NTFS v@VERSION@.  Check new version: http://www.jankratochvil.net/'."\n";
-                       last;
-                       }
-               }
-       }
-
-
 # Keep @opt_captive ordering
 # to let the options be overridable by user (such as 'ro').
 my @opt_captive=();
 my @opt_lufs=();
 my $opt_force;
+my $opt_rwmode="--blind";
 for (split /,/,$oo) {
        $_="--$_" if $_ eq "ro" || $_ eq "rw";
+       $opt_rwmode=$_ if /^--(?:ro|rw|blind)$/;
        $opt_force=1 if $_ eq "force";
        push @opt_captive,$_ if  /^--/;
        push @opt_lufs,$_    if !/^--/;
        }
 
+# Shameless advertisement:
+if ($fsname eq "ntfs") {
+       for my $fh (*STDERR,*STDOUT) {
+               if (-t $fh) {
+                       print $fh 'Captive NTFS v@VERSION@.  Check a new version at: http://www.jankratochvil.net/'."\n";
+                       last;
+                       }
+               }
+       }
+
 if (!$opt_force) {
        local *MTAB;
        if (!open MTAB,"/etc/mtab") {