Ticket #22951: patch-configure.diff
File patch-configure.diff, 8.1 KB (added by groolot@…, 15 years ago) |
---|
-
configure
old new 8 8 9 9 # Configuration script for the Autopsy Forensic Browser 10 10 # 11 # This configuration file has been adapted to comply with 12 # MacPorts port installation system. 13 # 11 14 # Brian Carrier [carrier@sleuthkit.org] 12 15 # 13 16 # Copyright (c) 2003-2008 by Brian Carrier. All rights reserved … … 67 70 else 68 71 echo "perl found: ${d}perl (version $ver)"; 69 72 echo "#!${d}perl -wT" > ./config.tmp; 70 echo "#!${d}perl" > ./config2.tmp;71 73 perlexe="${d}perl"; 72 74 found=1; 73 75 break; … … 79 81 # If it wasn't found, then prompt for it. 80 82 if (test $found -eq 0) then 81 83 echo 'ERROR: perl not found or the incorrect version found'; 82 while (test 1 -eq 1) 83 do echo 'Enter location of perl executable:'; 84 read perlexe; 85 if (test -x "$perlexe") then 86 if (test -n "`$perlexe -v 2> /dev/null | awk '/This is perl/ {print $0}'`") then 87 ver=`$perlexe -e 'print $];'`; 88 if (`$perlexe -e 'exit( $] >= 5.008);'`) then 89 echo "This version of Perl is too old, 5.8.0 or older needed"; 90 else 91 echo "Correct version found"; 92 echo "#!${perlexe} -wT" > ./config.tmp; 93 echo "#!${perlexe}" > ./config2.tmp; 94 found=1; 95 break; 96 fi; 97 else 98 echo "Perl found, but is not working. Try another"; 99 fi; 100 else 101 echo "file not found"; 102 fi 103 done 84 exit 1; 104 85 fi 105 86 106 87 # Check if this version of Perl supports large files … … 109 90 echo ' NOTE: It appears that your Perl does not support large files.'; 110 91 echo ' You therefore will not be able to analyze images larger than 2GB.'; 111 92 echo ' Download the source version from www.cpan.org and compile a new version.'; 112 echo " [Press Enter to Continue]"; 113 read foo; 114 echo '' 93 exit1; 115 94 fi; 116 95 117 96 # Get current working directory for lib … … 120 99 121 100 # Write autopsy 122 101 if (test -f ./autopsy) then 123 echo "autopsy already exists, overwrite? (y/n):"; 124 read rep; 125 if (test "$rep" = "y") then 126 cat ./config.tmp base/autopsy.base > ./autopsy 127 cat ./config2.tmp base/make-live-cd.base > ./make-live-cd 128 else 129 echo ' original version was kept'; 130 fi 102 echo "autopsy already exists, backup to autopsy.old"; 103 mv ./autopsy ./autopsy.old 104 cat ./config.tmp base/autopsy.base > ./autopsy 131 105 else 132 106 cat ./config.tmp base/autopsy.base > ./autopsy 133 cat ./config2.tmp base/make-live-cd.base > ./make-live-cd134 107 fi 135 108 chmod 0755 ./autopsy 136 chmod 0755 ./make-live-cd137 109 138 110 # cleanup 139 111 rm -f ./config.tmp 140 rm -f ./config2.tmp141 112 142 113 143 114 ############################################################################# … … 146 117 147 118 148 119 conf='conf.pl' 149 150 120 if (test -f $conf) then 151 echo "A configuration file already exists, overwrite? (y/n):"; 152 read rep; 153 if (test "$rep" = "n") then 154 exit 0; 155 fi 121 echo "A configuration file already exists, backup to $conf.old"; 122 mv $conf $conf.old 156 123 fi 157 124 158 # echo ''159 # echo '---------------------------------------------------------------'160 # echo ''161 # echo 'Autopsy can use the configuration file from a previous installation'162 # echo ''163 # echo 'Would you like to use a previous configuration file (y/n) [n]'164 # read rep;165 # if (test "$rep" = "y") then166 167 # echo 'Enter the directory of the previous installation (or cancel):'168 # while (test 1 -eq 1)169 # do read prevdir;170 # if (test "$prevdir" = "cancel") then171 # break;172 # fi;173 # if (test -f "${prevdir}/conf.pl") then174 # /bin/cp "${prevdir}/conf.pl" .175 # echo ' Configuration file copied from $prevdir';176 177 # # Check the config status178 # exit 0;179 # fi;180 # echo 'Configuration file not found, try again (or 'cancel' to stop):'181 # done;182 #fi;183 184 125 185 126 # First add the variables that are static 186 127 # … … 240 181 # Prompt if not found 241 182 if (test $found -eq 0) then 242 183 echo 'ERROR: grep utility not found'; 243 echo 'Enter location of executable:'; 244 while (test 1 -eq 1) 245 do read grepexe; 246 if (test -x "$grepexe") then 247 echo \$GREP_EXE = \'$grepexe\'\; >> $conf; 248 break; 249 else 250 echo 'grep was not found (try again):'; 251 fi; 252 done 184 exit 1; 253 185 fi 254 186 255 187 … … 269 201 # Prompt if not found 270 202 if (test $found -eq 0) then 271 203 echo 'ERROR: file utility not found'; 272 echo 'Enter location of executable:'; 273 while (test 1 -eq 1) 274 do read fileexe; 275 if (test -x "$fileexe") then 276 echo \$FILE_EXE = \'$filexe\'\; >> $conf; 277 break; 278 else 279 echo 'file was not found (try again):'; 280 fi; 281 done 204 exit 1; 282 205 fi 283 206 284 207 # … … 302 225 # Prompt if not found 303 226 if (test $found -eq 0) then 304 227 echo 'ERROR: md5/md5sum utility not found'; 305 echo 'Enter location of executable:'; 306 while (test 1 -eq 1) 307 do read md5exe; 308 if (test -x "$md5exe") then 309 echo \$MD5_EXE = \'$md5exe\'\; >> $conf; 310 break; 311 else 312 echo 'md5 was not found (try again):'; 313 fi; 314 done 228 exit 1; 315 229 fi 316 230 317 231 … … 373 287 if (test $found -eq 0) then 374 288 echo 'Sleuth Kit tools were not found in the standard install locations.' 375 289 echo 'If you have not installed them, do so now and configure autopsy again.' 376 echo 'If you have installed them in a non-standard location, then' 377 echo ' enter the "bin" directory now:' 378 379 while (test 1 -eq 1) 380 do read tskdir; 381 if ((test -x ${tskdir}/fls) && (test -x ${tskdir}/ffind) && (test -x ${tskdir}/blkstat) && \ 382 (test -x ${tskdir}/blkls) && (test -x ${tskdir}/blkcat) && \ 383 (test -x ${tskdir}/mmls) && (test -x ${tskdir}/mmstat) && \ 384 (test -x ${tskdir}/fsstat) && (test -x ${tskdir}/img_stat) && \ 385 (test -x ${tskdir}/istat) && (test -x ${tskdir}/ifind) && \ 386 (test -x ${tskdir}/icat) && (test -x ${tskdir}/ils) && \ 387 (test -x ${tskdir}/srch_strings) && \ 388 (test -x ${tskdir}/mactime) && (test -x ${tskdir}/sorter)) then 389 echo \$TSKDIR = \'${tskdir}\'\; >> $conf; 390 break; 391 else 392 echo 'TSK tools were not found or incomplete (try again):'; 393 fi; 394 done 290 exit 1; 395 291 fi; 396 292 397 293 # Test for latest version … … 405 301 elif (test "$ver" '<' "$curtskver") then 406 302 echo ''; 407 303 echo "*** NOTE: A more recent version ($curtskver) of The Sleuth Kit Exists ***" 408 echo " [Press Enter to Continue]";409 read foo;410 411 304 else 412 305 echo ' Required version found'; 413 306 fi … … 422 315 echo 'hash values of known good and bad files.' 423 316 echo ' http://www.nsrl.nist.gov' 424 317 echo '' 425 echo 'Have you purchased or downloaded a copy of the NSRL (y/n) [n]' 426 read rep; 427 if (test "$rep" = "y") then 428 429 echo 'Enter the directory where you installed it:' 430 while (test 1 -eq 1) 431 do read nsrldir; 432 if (test "$nsrldir" = "cancel") then 433 echo \$NSRLDB = \'\'\; >> $conf; 434 break; 435 fi; 436 if (test -f "${nsrldir}/NSRLFile.txt") then 437 echo ' NSRL database was found (NSRLFile.txt)'; 438 echo \$NSRLDB = \'${nsrldir}/NSRLFile.txt\'\; >> $conf; 439 440 if (test -f "${nsrldir}/NSRLFile.txt-md5.idx") then 441 echo ' NSRL Index file found (NSRLFile.txt-md5.idx)'; 442 else 443 echo ' NSRL Index file not found, do you want it created? (y/n) [n]:' 444 read rep; 445 if (test "$rep" = "y") then 446 echo '' 447 echo '-------------- begin hfind output --------------' 448 "${tskdir}/hfind" -i nsrl-md5 "${nsrldir}/NSRLFile.txt"; 449 echo '--------------- end hfind output ---------------' 450 echo '' 451 fi; 452 fi; 453 break; 454 else 455 echo 'The NSRL was not found (the directory should have NSRLFile.txt in it)'; 456 echo 'Enter a new directory (or cancel to stop):'; 457 fi; 458 done 459 else 460 echo \$NSRLDB = \'\'\; >> $conf; 461 fi; 318 echo \$NSRLDB = \'\'\; >> $conf; 462 319 463 320 ############################################################################# 464 321 # EVIDENCE LOCKER … … 470 327 echo 'Autopsy saves configuration files, audit logs, and output to the' 471 328 echo 'Evidence Locker directory.' 472 329 echo '' 473 echo 'Enter the directory that you want to use for the Evidence Locker:'; 474 read locker; 330 locker='MP_AUTOPSY_LOCKER' 475 331 if (test -d "${locker}") then 476 332 echo " $locker already exists" 477 333 else