X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=src%2Fclient%2Flufs%2Fmount.captive.in;h=3e0a47f845ef56e0f88a80f83abde9bb35a836f0;hb=a2dd38f86df22c46ae18f3ad7d9850eaacb02b92;hp=209e27c0a2726c46e9a3549323a6151288470026;hpb=1ca2a035b4f19c173941930a8dd678afe0b11cc3;p=captive.git diff --git a/src/client/lufs/mount.captive.in b/src/client/lufs/mount.captive.in index 209e27c..3e0a47f 100755 --- a/src/client/lufs/mount.captive.in +++ b/src/client/lufs/mount.captive.in @@ -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") {