Cosmetic: Include suggestion for W32 drivers acquire possibilities.
[captive.git] / src / client / lufs / mount.captive.in
index dd96050..f4c3998 100755 (executable)
@@ -50,11 +50,25 @@ my $oo="";
 do { shift @ARGV; $oo=shift @ARGV; } if $ARGV[0] && $ARGV[0] eq "-o";
 die "Excessive arguments: @ARGV" if @ARGV;
 
+sub die_install
+{
+       die
+"You should run captive-install-acquire(1) of 'captive-install' package,
+otherwise you can also acquire this file from URL:
+http://www.microsoft.com/WindowsXP/pro/downloads/servicepacks/sp1/checkedbuild.asp
+";
+}
+
 my $filesystem=$vardir."/".$fsname.".sys";
--r $filesystem or die "W32 filesystem .sys module not readable: $filesystem";
+if (!-r $filesystem) {
+       warn "W32 filesystem .sys module not found: $filesystem";
+       die_install();
+       }
 my $ntoskrnl=$vardir."/ntoskrnl.exe";
--r $ntoskrnl or die "W32 ntoskrnl.exe not readable: $ntoskrnl";
-
+if (!-r $ntoskrnl) {
+       warn "W32 ntoskrnl.exe not found: $ntoskrnl";
+       die_install();
+       }
 
 # Shameless advertisement:
 if ($fsname eq "ntfs") {