/[pkg-mixmaster]/trunk/Mix/Install
ViewVC logotype

Diff of /trunk/Mix/Install

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by rabbi, Wed Oct 31 08:19:51 2001 UTC revision 799 by rabbi, Tue May 4 00:31:09 2004 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # Mixmaster version 3  --  (C) 1999 Anonymizer Inc.  # Mixmaster version 3.0  --  (C) 1999-2004 Anonymizer Inc. and others.
3    
4  # Mixmaster may be redistributed and modified under certain conditions.  # Mixmaster may be redistributed and modified under certain conditions.
5  # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF  # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
6  # ANY KIND, either express or implied. See the file COPYRIGHT for  # ANY KIND, either express or implied. See the file COPYRIGHT for
7  # details.  # details.
8    
9  # $Id: Install,v 1.1 2001/10/31 08:19:52 rabbi Exp $  # $Id$
10    
11  #whereis program default-path  #whereis program default-path
12  whereis()  whereis()
# Line 77  findlib() Line 77  findlib()
77   LDFLAG=   LDFLAG=
78   MAKELIB=   MAKELIB=
79    
80   for i in /usr/local/lib /usr/lib /lib   for i in /usr/local/lib /usr/lib /lib /usr/lib64
81   do   do
82    if [ -r $i/$lib -o -r $i/$libso ]    if [ -r $i/$lib -o -r $i/$libso ]
83    then    then
# Line 127  findlib() Line 127  findlib()
127   then   then
128    echo "Found source directory $source."    echo "Found source directory $source."
129    if [ "$found" = "" ]    if [ "$found" = "" ]
130    then    then
131     ans=y     ans=y
132    else    else
133     echo "Use the source if the pre-installed library causes compilation problems."     echo "Use the source if the pre-installed library causes compilation problems."
# Line 154  findlib() Line 154  findlib()
154   if [ "$type" = system ]   if [ "$type" = system ]
155   then   then
156    LIB=    LIB=
157    LDFLAG=-l`echo $lib | sed 's/^lib//;s/\.a$//'`    LDFLAG="-l`echo $lib | sed 's/^lib//;s/\.a$//'` -L$found"
158      if [ "$found" = "/usr/local/lib" ]
159      then
160        INCDIR="/usr/local/include $INCDIR"
161      fi
162   fi   fi
163    
164   incdir=$INCDIR   incdir=$INCDIR
# Line 215  findlib() Line 219  findlib()
219   fi   fi
220  }  }
221    
222    # Global installation.
223    
224    
225  ##########################################################################  ##########################################################################
226  umask 077  umask 077
227    
228    #FIXME -- Mixmaster now should be installed as root, and Install should
229    #create a remailer user. /var/spool/mixmaster is a good home.
230    
231  if [ `whoami` = root ]  if [ `whoami` = root ]
232  then  then
233   echo "Please create a new user, e.g, \`mix', and install Mixmaster under that   echo "Please create a new user, e.g, \`mix', and install Mixmaster under that
# Line 229  user id.  Installing Mixmaster as root i Line 239  user id.  Installing Mixmaster as root i
239   fi   fi
240  fi  fi
241    
242  MIXDIR=$PWD  MIXDIR="$PWD"
243  if [ "$MIXDIR" = "" ]  if [ "$MIXDIR" = "" ]
244  then  then
245   MIXDIR=`pwd`   MIXDIR=`pwd`
246  fi  fi
247  MIXCFG=$MIXDIR/conf  MIXCFG="$MIXDIR/conf"
248  MIXSRC=$MIXDIR/Src  MIXSRC="$MIXDIR/Src"
249  MIXDEST0=${MIXPATH:-$HOME/Mix}  MIXDEST0=${MIXPATH:-$HOME/Mix}
250    
251  system=`uname`  system=`uname`
# Line 259  then Line 269  then
269   MIXDEST0=${MIXPATH:-C:/Mix}   MIXDEST0=${MIXPATH:-C:/Mix}
270  fi  fi
271    
272  if [ -f $MIXSRC/Makefile ]  if [ -f "$MIXSRC/Makefile" ]
273  then  then
274   if grep "#Makefile generated.*$HOSTNAME" $MIXSRC/Makefile   if grep "#Makefile generated.*$HOSTNAME" $MIXSRC/Makefile
275   then   then
276    echo "Found a Makefile."    echo "Found a Makefile for this system."
277      readln "Use this Makefile?" y
278      if [ "$ans" = n ]
279      then
280       rm -f "$MIXSRC/Makefile"
281      fi
282   else   else
283    readln "Remove old Makefile?" y    readln "Remove old Makefile?" y
284    if [ "$ans" = y ]    if [ "$ans" = y ]
285    then    then
286     rm -f $MIXSRC/Makefile     rm -f "$MIXSRC/Makefile"
287    fi    fi
288   fi   fi
289  fi  fi
290    
291  if [ -f $MIXSRC/Makefile ]  if [ -f "$MIXSRC/Makefile" ]
292  then  then
293   MIXDEST=`grep "DSPOOL=" $MIXSRC/Makefile | sed 's/.*DSPOOL=..//;s/\".*//'`   MIXDEST=`grep "DSPOOL=" $MIXSRC/Makefile | sed 's/.*DSPOOL=..//;s/\".*//'`
294   if [ "$MIXDEST" = "" ]   if [ "$MIXDEST" = "" ]
# Line 284  fi Line 299  fi
299    
300  if [ "$MIXDEST" = "" ]  if [ "$MIXDEST" = "" ]
301  then  then
302   readln "Mixmaster directory?" $MIXDEST0   readln "Mixmaster directory?" "$MIXDEST0"
303   MIXDEST=$ans   MIXDEST=$ans
304  else  else
305   echo "Mixmaster directory: $MIXDEST"   echo "Mixmaster directory: $MIXDEST"
306  fi  fi
307    
308  if [ ! -d $MIXDEST ]  if [ ! -d "$MIXDEST" ]
309  then  then
310    echo "Creating directory $MIXDEST"    echo "Creating directory $MIXDEST"
311    mkdir $MIXDEST    mkdir "$MIXDEST"
312  fi  fi
313    
314  if [ ! -d $MIXDEST ]  if [ ! -d "$MIXDEST" ]
315  then  then
316    echo "Cannot not create $MIXDEST"    echo "Cannot not create $MIXDEST"
317    exit 1    exit 1
318  fi  fi
319    
320  if [ -f $MIXDEST/mix.cfg ]  if [ -f "$MIXDEST/mix.cfg" ]
321  then  then
322    if [ -f $MIXDEST/secring.mix ]    if [ -f "$MIXDEST/secring.mix" ]
323    then    then
324      remailer=y      remailer=y
325        if grep PASSPHRASE "$MIXDEST/mix.cfg" >/dev/null
326        then
327          PASSINCONFIG=1
328        fi
329    else    else
330      readln "Do you want to set up a remailer?" n      readln "Do you want to set up a remailer?" n
331      remailer=$ans      remailer=$ans
332    fi    fi
333  elif [ -f $MIXDEST/mixmaster.conf ]  elif [ -f "$MIXDEST/mixmaster.conf" ]
334  then  then
335    echo "Upgrading from Mixmaster 2.0.*"    echo "Upgrading from Mixmaster 2.0.*"
336    remailer=n    remailer=n
# Line 320  else Line 339  else
339    remailer=$ans    remailer=$ans
340  fi  fi
341    
342  cd $MIXSRC  
343    ans=""
344    if [ "$remailer" = "y" ]
345    then
346      ans="n"
347      if [ "$PASSINCONFIG" != 1 ]
348      then
349        echo ""
350        echo "You can either compile your secret passphrase into the binary
351    or you can set it in your config file. Note that the former does not
352    really increase security as the passphrase can still be discovered by
353    running something like \`strings mixmaster'."
354        echo ""
355        echo "Most users should answer \`n' to this question:"
356        echo ""
357        readln "Do you want to compile the passphrase into the binary?" n
358      fi
359    
360      rm -f "$MIXSRC/mix.o" # make sure our new passphrase takes effect
361      if [ "$ans" = "y" ]
362      then
363        ans=""
364        echo "Please enter a passphrase for your remailer (must be the same
365    whenever you re-compile Mixmaster)."
366        read ans
367    
368        if [ "$ans" != "" ]
369        then
370          PASS="PASS=$ans"
371        else
372          echo "WARNING: not setting a passphrase"
373        fi
374      else
375        if [ "$PASSINCONFIG" != 1 ]
376        then
377          ans=""
378          echo "Please enter a passphrase for your remailer (it will be
379    stored in mix.cfg in clear)."
380          read ans
381    
382          if [ "$ans" = "" ]
383          then
384            echo "WARNING: setting empty passphrase"
385          fi
386          PASSPHRASE="PASSPHRASE    $ans"
387          if [ -f $MIXDEST/mix.cfg ]
388          then
389            echo "$PASSPHRASE" >> $MIXDEST/mix.cfg
390          fi
391        fi
392      fi
393    fi
394    
395    
396    cd "$MIXSRC"
397  if [ ! -f Makefile ]  if [ ! -f Makefile ]
398  then  then
399   LIBS=   LIBS=
# Line 328  then Line 401  then
401   DEF=   DEF=
402   LDFLAGS=   LDFLAGS=
403    
404     if [ ! -z "$PASS" ]
405     then
406       DEF="$DEF -DCOMPILEDPASS='\"\$(PASS)\"'"
407     fi
408    
409   if [ "$system" = msdos ]   if [ "$system" = msdos ]
410   then   then
411    readln "Use WIN32 GUI?" y    readln "Use WIN32 GUI?" y
# Line 351  then Line 429  then
429    readln "Continue anyway?" n    readln "Continue anyway?" n
430    if [ "$ans" = "n" ]    if [ "$ans" = "n" ]
431    then    then
432     echo "Please install zlib now."     echo "Please install zlib 1.1.4 or greater now."
433     exit 1     exit 1
434    fi    fi
435   else   else
# Line 366  then Line 444  then
444   fi   fi
445    
446   LIBDIR=   LIBDIR=
447   INCDIR=   INCDIR="/usr/include /usr/include/pcre /usr/local/pcre/include"
448   SRCDIR=pcre*   SRCDIR=pcre*
449   findlib libpcre.a   findlib libpcre.a
450   if [ "$found" != "" ]   if [ "$found" != "" ]
# Line 381  then Line 459  then
459    fi    fi
460   fi   fi
461    
462   opensslinfo="Please get OpenSSL 0.9.4 from http://www.openssl.org/"   opensslinfo="Please get OpenSSL 0.9.6l or greater from http://www.openssl.org/"
463     opensslwarning6="WARNING: This version of OpenSSL contains known vulnerabilities. Please upgrade to OpenSSL 0.9.6l or greater!"
464     opensslwarning7="WARNING: This version of OpenSSL contains known vulnerabilities. Please upgrade to OpenSSL 0.9.7c or greater!"
465     opensslwarning0=$opensslwarning7
466   LIBDIR=/usr/local/ssl/lib   LIBDIR=/usr/local/ssl/lib
467   INCDIR="/usr/include /usr/include/ssl /usr/lib/ssl/include /usr/local/ssl/include"   INCDIR="/usr/include /usr/include/ssl /usr/lib/ssl/include /usr/local/ssl/include"
468   SRCDIR="openssl*"   SRCDIR="openssl*"
469    
470     opensslwarn()
471     {
472     if [ "$1" = "6" ]
473     then
474      echo $opensslwarning6
475     elif [ "$1" = "7" ]
476     then
477      echo $opensslwarning7
478     else
479      echo $opensslwarning0
480     fi
481      readln "Continue anyway?" y
482      if [ "$ans" = "n" ]
483      then
484       echo $opensslinfo
485       exit 1
486      fi
487     }
488    
489   if [ "$system" = win32 ]   if [ "$system" = win32 ]
490   then   then
491    findlib libeay32.a    findlib libeay32.a
# Line 398  then Line 498  then
498    exit 1    exit 1
499   fi   fi
500    
501     OPENSSLLIB="$LIB"
502   LIBS="$LIBS $LIB"   LIBS="$LIBS $LIB"
503   LDFLAGS="$LDFLAGS $LDFLAG"   LDFLAGS="$LDFLAGS $LDFLAG"
504   if [ "$MAKELIB" != "" ]   if [ "$MAKELIB" != "" ]
# Line 418  then Line 519  then
519      version=920      version=920
520     fi     fi
521    fi    fi
522   fi   fi
523    
524   # Find the OpenSSL version header   # Find the OpenSSL version header
525   if [ -f $INCDIR/openssl/opensslv.h ]   if [ -f "$INCDIR/openssl/opensslv.h" ]
526   then   then
527    version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/openssl/opensslv.h | sed 's/.*0x0*//;s/[     ].*//;s/L$//'`    version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/openssl/opensslv.h | sed 's/.*0x0*//;s/[     ].*//;s/L$//'`
528     elif [ -f "$INCDIR/opensslv.h" ]
529     then
530      version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/opensslv.h | sed 's/.*0x0*//;s/[     ].*//;s/L$//'`
531   fi   fi
532   if [ "$version" = "" ]   if [ "$version" = "" ]
533   then   then
# Line 434  then Line 538  then
538     echo $opensslinfo     echo $opensslinfo
539     exit 1     exit 1
540    fi    fi
541     elif [ "$version" = "90581f" ]
542     then
543      echo "Compiling with OpenSSL 0.9.5a."
544      opensslwarn 6
545     elif [ "$version" = "90601f" ]
546     then
547      echo "Compiling with OpenSSL 0.9.6a."
548      opensslwarn 6
549     elif [ "$version" = "90602f" ]
550     then
551      echo "Compiling with OpenSSL 0.9.6b."
552      opensslwarn 6
553     elif [ "$version" = "90603f" ]
554     then
555      echo "Compiling with OpenSSL 0.9.6c."
556      opensslwarn 6
557     elif [ "$version" = "90604f" ]
558     then
559      echo "Compiling with OpenSSL 0.9.6d."
560      opensslwarn 6
561     elif [ "$version" = "90605f" ]
562     then
563      echo "Compiling with OpenSSL 0.9.6e."
564      opensslwarn 6
565     elif [ "$version" = "90606f" ]
566     then
567      echo "Compiling with OpenSSL 0.9.6f."
568      opensslwarn 6
569     elif [ "$version" = "90607f" ]
570     then
571      echo "Compiling with OpenSSL 0.9.6g."
572      opensslwarn 6
573     elif [ "$version" = "90608f" ]
574     then
575      echo "Compiling with OpenSSL 0.9.6h."
576      opensslwarn 6
577    elif [ "$version" = "90609f" ]
578     then
579      echo "Compiling with OpenSSL 0.9.6i."
580      opensslwarn 6
581     elif [ "$version" = "9060a0" ]
582     then
583      echo "Compiling with OpenSSL 0.9.6j."
584      opensslwarn 6
585     elif [ "$version" = "9060b0" ]
586     then
587      echo "Compiling with OpenSSL 0.9.6k."
588      opensslwarn 6
589     elif [ "$version" = "9060c0" ]
590     then
591      echo "Compiling with OpenSSL 0.9.6l."
592     elif [ "$version" = "90700f" ]
593     then
594      echo "Compiling with OpenSSL 0.9.7."
595      opensslwarn 7
596      DEF="$DEF -DUSE_AES"
597     elif [ "$version" = "90701f" ]
598     then
599      echo "Compiling with OpenSSL 0.9.7a."
600      opensslwarn 7
601      DEF="$DEF -DUSE_AES"
602     elif [ "$version" = "90702f" ]
603     then
604      echo "Compiling with OpenSSL 0.9.7b."
605      opensslwarn 7
606      DEF="$DEF -DUSE_AES"
607     elif [ "$version" = "90703f" ]
608     then
609      echo "Compiling with OpenSSL 0.9.7c."
610      DEF="$DEF -DUSE_AES"
611     elif [ "$version" = "90704f" ]
612     then
613      echo "Compiling with OpenSSL 0.9.7d."
614      DEF="$DEF -DUSE_AES"
615   elif [ "$version" -lt "920" ]   elif [ "$version" -lt "920" ]
616   then   then
617    echo "This version of SSLeay is not supported."    echo "This version: ${version} of SSLeay is not supported."
618    echo $opensslinfo    echo $opensslinfo
619    exit 1    exit 1
620   elif [ "$version" -lt "903100" ]   elif [ "$version" -lt "903100" ]
621   then   then
622    echo "This version of OpenSSL is not supported."    echo "This version: ${version} of OpenSSL is not supported."
623    echo $opensslinfo    echo $opensslinfo
624    exit 1    exit 1
625   elif [ "$version" -gt "906000" ]   elif [ "$version" -gt "906000" ]
626   then   then
627    echo "Warning: This version of OpenSSL is untested."    echo "Warning: This version: ${version} of OpenSSL is untested."
628    readln "Continue anyway?" y    readln "Continue anyway?" y
629    if [ "$ans" = "n" ]    if [ "$ans" = "n" ]
630    then    then
631     echo $opensslinfo     echo $opensslinfo
632     exit 1     exit 1
633      else
634       echo "Does this version of OpenSSL contain AES support?"
635       readln "If unsure of the answer, say \`n'" n
636        if [ "$ans" = "y" ]
637        then
638        DEF="$DEF -DUSE_AES"
639        fi
640    fi    fi
641   fi   fi
642    
# Line 478  then Line 663  then
663    else    else
664     findlib libncurses.a     findlib libncurses.a
665    fi    fi
666   if [ "$found" = "" ]   if [ "$found" = "" ]
667   then   then
668    if [ "$system" != win32 ]    if [ "$system" != win32 ]
669    then    then
670     readln "Do you want to use Mixmaster's menu-based user interface?" y     readln "Do you want to use Mixmaster's menu-based user interface?" y
671     if [ "$ans" = "y" ]     if [ "$ans" = "y" ]
672     then     then
673      echo "Please install ncurses now. It is available from      echo "Please install ncurses now. It is available from http://www.clark.net/pub/dickey/ncurses/ncurses.tar.gz"
 http://www.clark.net/pub/dickey/ncurses/ncurses.tar.gz"  
674      exit 1      exit 1
675     fi     fi
676    fi    fi
# Line 510  http://www.clark.net/pub/dickey/ncurses/ Line 694  http://www.clark.net/pub/dickey/ncurses/
694    fi    fi
695   fi   fi
696    
697     ideawarn()
698     {
699        echo "
700      WARNING: Your version of OpenSSL has been configured without IDEA support.
701      If you continue, Mixmaster will be installed with reduced functionality.
702      This means (among other things) that Mixmaster will not create an RSA
703      OpenPGP key (to avoid mail loss in the Type I system). You may want to
704      re-install OpenSSL before proceeding.
705    
706      This will not concern you if you only plan to run a type II remailer or
707      simply want a type II client."
708        readln "Continue anyway?" y
709        if [ "$ans" = "n" ]
710        then
711         exit 1
712        fi
713     }
714    
715     if [ "$system" = OpenBSD ]
716     then
717      LIBDIR=
718      INCDIR=
719      SRCDIR=idea*
720      findlib libidea.a
721      if [ "$found" = "" ]
722      then
723       ideawarn
724      else
725       DEF="$DEF -DUSE_IDEA"
726       IDEALIB="$MAKELIB"
727       LIBS="$LIBS $LIB"
728       LDFLAGS="$LDFLAGS $LDFLAG"
729       if [ "$INCDIR" != "" ]
730       then
731        INC="$INC -I$INCDIR"
732       fi
733      fi
734     elif [ "$system" = msdos -o "$system" = win32 ]
735     then
736      DEF="$DEF -DUSE_IDEA"
737     else
738       echo "Checking for IDEA support..."
739       cat <<END >tmptst.c
740    #include <openssl/idea.h>
741    int main() {
742      void *dummy;
743      dummy = idea_cfb64_encrypt;
744      exit(0);
745    }
746    END
747       if gcc $LDFLAGS $INC tmptst.c -o tmptst $OPENSSLLIB
748       then
749         DEF="$DEF -DUSE_IDEA"
750       else
751         ideawarn
752       fi
753       rm -f tmptst.c tmptst
754     fi
755    
756    
757  # if [ "$MIXDEST" = "$HOME/Mix" ]  # if [ "$MIXDEST" = "$HOME/Mix" ]
758  # then  # then
759  #  SPOOL=  #  SPOOL=
# Line 524  http://www.clark.net/pub/dickey/ncurses/ Line 768  http://www.clark.net/pub/dickey/ncurses/
768       -e "s#%LDFLAGS#$LDFLAGS#" \       -e "s#%LDFLAGS#$LDFLAGS#" \
769       -e "s#%INC#$INC#" \       -e "s#%INC#$INC#" \
770       -e "s#%DEF#$DEF#" < Makefile.in >> Makefile       -e "s#%DEF#$DEF#" < Makefile.in >> Makefile
771   echo "$ZLIB" >>Makefile  # echo "$ZLIB" >>Makefile
772   echo "$PCRE" >>Makefile  # echo "$PCRE" >>Makefile
773     echo "$IDEALIB" >>Makefile
774   echo "$NCURSES" >>Makefile   echo "$NCURSES" >>Makefile
775   echo "$OPENSSL" >>Makefile   echo "$OPENSSL" >>Makefile
776  fi  fi
777    
 ans=""  
 if [ "$remailer" = "y" ]  
 then  
   echo "Please enter a pass phrase for your remailer (must be the same  
 whenever you re-compile Mixmaster)."  
   read ans  
 fi  
778    
779  if [ "$ans" != "" ]  
780  then  
  PASS="PASS=$ans"  
 fi  
781    
782  echo "Compiling. Please wait."  echo "Compiling. Please wait."
783  whereis gmake make  whereis make
784  make=$found  make=$found
785    
786  if [ "$system" = win32 ]  if [ "$system" = win32 ]
787  then  then
788   (cd zlib*; make libz.a)  # (cd zlib*; make libz.a)
789   (cd pcre*; make libpcre.a)  # (cd pcre*; make libpcre.a)
790   if [ "$PASS" != "" ]   if [ "$PASS" != "" ]
791   then   then
792    $make "$PASS" dllmix    $make "$PASS" dllmix
# Line 566  else Line 802  else
802   fi   fi
803  fi  fi
804    
805  if [ -x mix ]  if [ -x mixmaster ]
806  then  then
807   echo   echo
808  else  else
# Line 580  else Line 816  else
816   exit 1   exit 1
817  fi  fi
818    
819  if [ -f $MIXDEST/mixmaster.conf -a ! -f $MIXDEST/mix.cfg ]  if [ -f "$MIXDEST/mixmaster.conf" -a ! -f "$MIXDEST/mix.cfg" ]
820  then  then
821   export MIXDEST   export MIXDEST
822   export MIXDIR   export MIXDIR
823   export MIXSRC   export MIXSRC
824   ${MIXDIR}/upgrade   "${MIXDIR}/upgrade"
825   exit 0   exit 0
826  fi  fi
827    
828  if [ -f mix.exe ]  if [ -f mixmaster.exe ]
829  then  then
830   cp mix.exe $MIXDEST   cp mixmaster.exe "$MIXDEST"
831  else  else
832   cp mix $MIXDEST   cp mixmaster "$MIXDEST"
833  fi  fi
834    
835  cd $MIXCFG  cd "$MIXCFG"
836  for i in mlist.txt pubring.mix rlist.txt pubring.asc type2.list  for i in mlist.txt pubring.mix rlist.txt pubring.asc type2.list
837  do  do
838   if [ ! -f $MIXDEST/$i ]   if [ ! -f "$MIXDEST/$i" ]
839   then   then
840    cp $i $MIXDEST    cp "$i" "$MIXDEST"
841   fi   fi
842  done  done
843    
844  if [ "$remailer" = "y" ]  if [ "$remailer" = "y" ]
845  then  then
846   cd $MIXCFG   cd "$MIXCFG"
847   for i in adminkey.txt dest.alw   for i in adminkey.txt dest.alw
848   do   do
849    if [ ! -f $MIXDEST/$i ]    if [ ! -f "$MIXDEST/$i" ]
850    then    then
851     cp $i $MIXDEST     cp "$i" "$MIXDEST"
852    fi    fi
853   done   done
854  fi  fi
855    
856  if [ "$remailer" = "n" ]  if [ "$remailer" = "n" ]
857  then  then
858   if [ ! -f $MIXDEST/mix.cfg ]   if [ ! -f "$MIXDEST/mix.cfg" ]
859   then   then
860    whereis sendmail /usr/lib/sendmail /usr/sbin/sendmail    whereis sendmail /usr/lib/sendmail /usr/sbin/sendmail
861    echo "SENDMAIL        $found -t" >$MIXDEST/mix.cfg    echo "SENDMAIL        $found -t" >"$MIXDEST/mix.cfg"
862    cat mix.cfg >>$MIXDEST/mix.cfg    cat mix.cfg >>"$MIXDEST/mix.cfg"
863   fi   fi
864   echo "Client installation complete."   echo "Client installation complete."
865   exit   exit
# Line 631  fi Line 867  fi
867    
868  for i in *.blk  for i in *.blk
869  do  do
870   if [ ! -f $MIXDEST/$i ]   if [ ! -f "$MIXDEST/$i" ]
871   then   then
872    cp $i $MIXDEST    cp "$i" "$MIXDEST"
873   fi   fi
874  done  done
875    
876  cd $MIXDEST  cd "$MIXDEST"
877    
878  installed=n  installed=n
879  if [ -f mix.cfg ]  if [ -f mix.cfg ]
# Line 646  then Line 882  then
882   then   then
883    installed=y    installed=y
884   fi   fi
885  fi  fi
886    
887  if [ "$installed" = "n" ]  if [ "$installed" = "n" ]
888  then  then
# Line 697  understand (If the address <$RMA> is als Line 933  understand (If the address <$RMA> is als
933   readln "Accept Mixmaster (Type II) messages?" y   readln "Accept Mixmaster (Type II) messages?" y
934   mix=$ans   mix=$ans
935    
936   readln "Accept PGP (Type I) remailer messages?" y   readln "Accept PGP (Type I) remailer messages?" n
937   pgp=$ans   pgp=$ans
938    
939   unencrypted=n   unencrypted=n
# Line 708  understand (If the address <$RMA> is als Line 944  understand (If the address <$RMA> is als
944   fi   fi
945    
946   echo "Mixmaster will log error messages and warnings. Do you want to log"   echo "Mixmaster will log error messages and warnings. Do you want to log"
947   readln "informational messages about normal operation as well?" y   readln "informational messages about normal operation as well?" y
948   if [ "$ans" = y ]   if [ "$ans" = y ]
949   then   then
950    verbose=2    verbose=2
951   else   else
952    verbose=1    verbose=1
# Line 747  y)es, post locally; use m)ail-to-news ga Line 983  y)es, post locally; use m)ail-to-news ga
983    fi    fi
984   fi   fi
985    
986   echo "How many messages do you want to keep in the reordering pool?  # Commented the poolsize question out, since poolsize is the least
987  A larger pool is more secure, but also causes higher latency.  # important of the three pool parameters.
988  0 means to remail immediately."  #
989   readln "Pool size:" 20  # echo "How many messages do you want to keep in the reordering pool?
990   poolsize=$ans  #A larger pool is more secure, but also causes higher latency.
991    #0 means to remail immediately."
992    # readln "Pool size:" 45
993    # poolsize=$ans
994    
995   mbox=   mbox=
996   if [ -f ~/.forward ]   if [ -f ~/.forward ]
# Line 776  A larger pool is more secure, but also c Line 1015  A larger pool is more secure, but also c
1015    if [ ! -w "$mbox" ]    if [ ! -w "$mbox" ]
1016    then    then
1017     echo "$mbox is not writeable."     echo "$mbox is not writeable."
1018     readln "Mailbox for non-remailer messages:" ${MIXDEST}/mbox     readln "Mailbox for non-remailer messages:" "${MIXDEST}/mbox"
1019     mbox=$ans     mbox=$ans
1020    fi    fi
1021   fi   fi
# Line 800  MIDDLEMAN      $middle Line 1039  MIDDLEMAN      $middle
1039  BINFILTER       $binfilter  BINFILTER       $binfilter
1040  AUTOBLOCK       $autoblock  AUTOBLOCK       $autoblock
1041    
1042  ERRLOG          errlog  ERRLOG          error.log
1043  VERBOSE         $verbose  VERBOSE         $verbose
1044    
1045  # Remailer name and addresses  # Remailer name and addresses
# Line 826  ORGANIZATION   $orga Line 1065  ORGANIZATION   $orga
1065  MID             $mid  MID             $mid
1066    
1067  # Remailing strategy:  # Remailing strategy:
1068  SENDPOOLTIME    0h  SENDPOOLTIME    15m
1069  POOLSIZE        $poolsize  POOLSIZE        45
1070  RATE            100  RATE            65
1071    INDUMMYP        10
1072    OUTDUMMYP       90
1073    CHAIN           *,*,*,*
1074  IDEXP           7d  IDEXP           7d
1075  PACKETEXP       7d  PACKETEXP       7d
1076    
1077    $PASSPHRASE
1078    
1079  END  END
1080  fi  
1081    fi # not yet installed
1082    
1083    
1084  REPLACE="s/%RMN/$RMN/g;s/%RMA/$RMA/g;s/%CA/$CA/g;s/%RAA/$RAA/g"  REPLACE="s/%RMN/$RMN/g;s/%RMA/$RMA/g;s/%CA/$CA/g;s/%RAA/$RAA/g"
1085  if [ "$installed" = "n" ]  if [ "$installed" = "n" ]
1086  then  then
1087   cd $MIXCFG   cd "$MIXCFG"
1088   if [ ! -f $MIXDEST/help.txt ]   if [ ! -f "$MIXDEST/help.txt" ]
1089   then   then
1090    sed "$REPLACE" < intro.hlp >$MIXDEST/help.txt    sed "$REPLACE" < intro.hlp >"$MIXDEST/help.txt"
1091    if [ "$mix" = y ]    if [ "$mix" = y ]
1092    then    then
1093     sed "$REPLACE" < mix.hlp >>$MIXDEST/help.txt     sed "$REPLACE" < mix.hlp >>"$MIXDEST/help.txt"
1094    fi    fi
1095    if [ "$unencrypted" = y ]    if [ "$unencrypted" = y ]
1096    then    then
1097     sed "$REPLACE" < type1.hlp >>$MIXDEST/help.txt     sed "$REPLACE" < type1.hlp >>"$MIXDEST/help.txt"
1098     if [ "$pgp" = y ]     if [ "$pgp" = y ]
1099     then     then
1100      sed "$REPLACE" < pgp.hlp >>$MIXDEST/help.txt      sed "$REPLACE" < pgp.hlp >>"$MIXDEST/help.txt"
1101     fi     fi
1102    elif [ "$pgp" = y ]    elif [ "$pgp" = y ]
1103    then    then
1104     sed "$REPLACE" < pgponly.hlp >>$MIXDEST/help.txt     sed "$REPLACE" < pgponly.hlp >>"$MIXDEST/help.txt"
1105    fi    fi
1106    if [ "$post" = y ]    if [ "$post" = y ]
1107    then    then
1108     if [ "$pgp" = y -o "$unencrypted" = y ]     if [ "$pgp" = y -o "$unencrypted" = y ]
1109     then     then
1110      sed "$REPLACE" < news.hlp >>$MIXDEST/help.txt      sed "$REPLACE" < news.hlp >>"$MIXDEST/help.txt"
1111     fi     fi
1112    fi    fi
1113    sed "$REPLACE" < end.hlp >>$MIXDEST/help.txt    sed "$REPLACE" < end.hlp >>"$MIXDEST/help.txt"
1114   fi   fi
1115    
1116   for i in *.txt.in   for i in *.txt.in
1117   do   do
1118    j=`echo $i | sed 's/\.in$//'`    j=`echo $i | sed 's/\.in$//'`
1119    if [ ! -f $MIXDEST/$j ]    if [ ! -f "$MIXDEST/$j" ]
1120    then    then
1121      sed "$REPLACE" < $i >$MIXDEST/$j      sed "$REPLACE" < "$i" >"$MIXDEST/$j"
1122    fi    fi
1123   done   done
1124   cd $MIXDEST   cd "$MIXDEST"
1125  fi  fi
1126    
1127  echo  echo
# Line 886  then Line 1131  then
1131  else  else
1132   echo "Updating secret keys..."   echo "Updating secret keys..."
1133  fi  fi
1134  ./mix -K  ./mixmaster -K
1135  if [ -f key.txt ]  if [ -f key.txt ]
1136  then  then
1137   echo "Done."   echo "Done."
# Line 904  fi Line 1149  fi
1149  umask 033  umask 033
1150    
1151  # Set .forward?  # Set .forward?
1152    #
1153  set=y  set=y
1154    # FIXME -- Mixmastger should run in daemon mode, not from procmail
1155    # Make the Install script do that.
1156    
1157  if grep procmail ~/.forward >/dev/null 2>/dev/null  if grep procmail ~/.forward >/dev/null 2>/dev/null
1158  then  then
# Line 941  fi Line 1189  fi
1189  if [ "$set" = y ]  if [ "$set" = y ]
1190  then  then
1191   echo "Set .forward to the following line:"   echo "Set .forward to the following line:"
1192   echo "\"|${MIXDEST}/mix -RM\""   echo "\"|${MIXDEST}/mixmaster -RM\""
1193   if [ -f ~/.forward ]   if [ -f ~/.forward ]
1194   then   then
1195    readln "Overwrite now?" n    readln "Overwrite now?" n
1196   else   else
1197    readln "Do that now?" y    readln "Do that now?" n
1198   fi   fi
1199   if [ "$ans" = "y" ]   if [ "$ans" = "y" ]
1200   then   then
1201    echo "\"|${MIXDEST}/mix -RM\"" >~/.forward    echo "\"|${MIXDEST}/mixmaster -RM\"" >~/.forward
1202   fi   fi
1203  fi  fi
1204    
1205    #FIXME -- we need a second script that can re-generate help files
1206    # when the conf changes.
1207    
1208  if [ "$RMA" != "" ]  if [ "$RMA" != "" ]
1209  then  then
1210   echo "   echo "

Legend:
Removed from v.1  
changed lines
  Added in v.799

  ViewVC Help
Powered by ViewVC 1.1.5