Cosmetic wording fix of the 'check new version'.
authorshort <>
Thu, 4 Dec 2003 15:12:26 +0000 (15:12 +0000)
committershort <>
Thu, 4 Dec 2003 15:12:26 +0000 (15:12 +0000)
+Notice the auto-chkdsk of MS-Windows.

src/client/lufs/mount.captive.in

index 209e27c..09e52bf 100755 (executable)
@@ -71,29 +71,32 @@ 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";
+                       print $fh 'Captive forces MS-Windows to run safety chkdsk during the next MS-Windows boot.'."\n"
+                                       if $opt_rwmode ne "--ro";
+                       last;
+                       }
+               }
+       }
+
 if (!$opt_force) {
        local *MTAB;
        if (!open MTAB,"/etc/mtab") {