home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / uumail4 / part01 next >
Encoding:
Internet Message Format  |  1987-02-24  |  49.3 KB

  1. Subject:  v08i033:  Uumail release 4.2, Part01/04
  2. Newsgroups: mod.sources
  3. Approved: mirror!rs
  4.  
  5. Submitted by: sob@soma.BCM.TMC.EDU (Stan Barber)
  6. Mod.sources: Volume 8, Issue 33
  7. Archive-name: uumail4/Part01
  8.  
  9. [  IMPORTANT NOTE:  This version superceeds the recent net.sources posting
  10.    because it also inclues the Patch#1.  An earlier version of Uumail
  11.    was next in the backlog, hence this "rapid" posting.  --r$  ]
  12.  
  13. #! /bin/sh
  14.  
  15. # Make a new directory for the uumail sources, cd to it, 
  16. # and run kits 1 thru 4 through sh. 
  17. # When all 4 kits have been run, read README.
  18.  
  19. echo "This is uumail kit 1 (of 4).  If kit 1 is complete, the line"
  20. echo '"'"End of kit 1 (of 4)"'" will echo at the end.'
  21. echo ""
  22. export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
  23. echo Extracting Configure
  24. cat >Configure <<'!STUFFY!FUNK!'
  25. #! /bin/sh
  26. #
  27. # If these # comments don't work, trim them.  Don't worry about the other
  28. # shell scripts, Configure will trim # comments from them for you.
  29. #
  30. # $Header: Configure,v 1.12 87/02/02 15:44:21 sob Exp $
  31. #
  32. # $Log:    Configure,v $
  33. # Revision 1.12  87/02/02  15:44:21  sob
  34. # Added localflags option
  35. # Revision 1.11  86/12/15  13:27:39  sob
  36. # Fixed useknownhosts bug
  37. # Revision 1.10  86/11/06  01:58:57  sob
  38. # Altered DBM to UUDBM to avoid possible conflicts under 4.3 BSD
  39. # Thanks to page@ulowell for the report
  40. # Revision 1.9  86/11/03  22:57:41  sob
  41. # Spelling fix.
  42. # Sheesh.
  43. # Revision 1.8  86/11/03  22:53:43  sob
  44. # Fixes provided by lowell!page
  45. # Revision 1.5  86/10/21  15:35:10  sob
  46. # Added RETURN mail definition
  47. # Revision 1.4  86/10/21  15:07:07  sob
  48. # Changes to use the MANIFEST file effectively.
  49. # Revision 1.3  86/10/10  18:25:48  sob
  50. # Modified uuconf.h here
  51. # Revision 1.2  86/10/07  15:13:49  sob
  52. # Modifications for better use on SYSTEM V
  53. # Yes, you may rip this off to use in other distribution packages.
  54. # Thanks, Larry Wall. I did! Stan Barber
  55. #
  56. n=''
  57. c=''
  58. libc=''
  59. eunicefix=''
  60. eunice=''
  61. sysexits=''
  62. cpp=''
  63. useknownhost=''
  64. knownhost=''
  65. shsharp=''
  66. spitshell=''
  67. startsh=''
  68. test=''
  69. expr=''
  70. sed=''
  71. echo=''
  72. cat=''
  73. rm=''
  74. mv=''
  75. cp=''
  76. tail=''
  77. log=''
  78. sorted=''
  79. tr=''
  80. mkdir=''
  81. sort=''
  82. uniq=''
  83. grep=''
  84. egrep=''
  85. contains=''
  86. lib=''
  87. nametype=''
  88. cc=''
  89. iandd=''
  90. ndirlib=''
  91. libndir=''
  92. usendir=''
  93. ndirc=''
  94. ndiro=''
  95. debug=''
  96. resolve=''
  97. mailer=''
  98. localmail=''
  99. localflags=''
  100. internet=''
  101. returnmail=''
  102. bindir=''
  103. filexp=''
  104. Log=''
  105. Header=''
  106. sitename=''
  107. orgname=''
  108. mailadmin=''
  109. libdbm=''
  110. mansrc=''
  111. manext=''
  112. maildir=''
  113. spool=''
  114. active=''
  115. myactive=''
  116. mininact=''
  117. pref=''
  118. defeditor=''
  119. rootid=''
  120. mboxchar=''
  121. locpref=''
  122. orgpref=''
  123. citypref=''
  124. statepref=''
  125. cntrypref=''
  126. contpref=''
  127. strchr=''
  128. novoid=''
  129. novfork=''
  130. portable=''
  131. passnam=''
  132. berknam=''
  133. usgnam=''
  134. whoami=''
  135. termio=''
  136. fcntl=''
  137. ioctl=''
  138. database=''
  139. logfile=''
  140. noalias=''
  141. aliases=''
  142. havetlib=''
  143. getpwent=''
  144. gethostname=''
  145. douname=''
  146. phostname=''
  147. hostcmd=''
  148. norelay=''
  149. CONFIG=''
  150.  
  151. echo "Beginning of configuration questions for uumail kit."
  152. : Eunice requires " " instead of "", can you believe it
  153. echo " "
  154.  
  155. : sanity checks
  156. PATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc'
  157. export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  158.  
  159. if test ! -t 0; then
  160.     echo "Say 'sh Configure', not 'sh <Configure'"
  161.     exit 1
  162. fi
  163.  
  164. : some greps do not return status, grrr.
  165. echo "grimblepritz" >grimble
  166. if grep blurfldyick grimble >/dev/null 2>&1 ; then
  167.     contains=contains
  168. else
  169.     if grep grimblepritz grimble >/dev/null 2>&1 ; then
  170.     contains=grep
  171.     else
  172.     contains=contains
  173.     fi
  174. fi
  175. rm grimble
  176. : the following should work in any shell
  177. case $contains in
  178. contains*)
  179.     echo " "
  180.     echo "AGH!  Grep doesn't return a status.  Attempting remedial action."
  181.     cat >contains <<'EOSS'
  182. grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
  183. EOSS
  184. chmod 755 contains
  185. esac
  186.  
  187. : first determine how to suppress newline on echo command
  188. echo "Checking echo to see how to suppress newlines..."
  189. (echo "hi there\c" ; echo " ") >.echotmp
  190. if $contains c .echotmp >/dev/null 2>&1 ; then
  191.     echo "...using -n."
  192.     n='-n'
  193.     c=''
  194. else
  195.     echo "...using \\\c."
  196.     n=''
  197.     c='\c'
  198. fi
  199. echo $n "Type carriage return to continue.  Your cursor should be here-->$c"
  200. read ans
  201. rm .echotmp
  202.  
  203. : now set up to do reads with possible shell escape
  204. : if this does not work on your machine, 1,$s/. myread/read ans/
  205. cat <<EOSC >myread
  206. ans='!'
  207. while expr "X\$ans" : "X!" >/dev/null; do
  208.     read ans
  209.     case "\$ans" in
  210.     !)
  211.     sh
  212.     echo " "
  213.     echo $n "Your answer: $c"
  214.     ;;
  215.     !*)
  216.     set \`expr "X\$ans" : "X!\(.*\)\$"\`
  217.     sh -c "\$*"
  218.     echo " "
  219.     echo $n "Your answer: $c"
  220.     ;;
  221.     esac
  222. done
  223. EOSC
  224. : general instructions
  225. cat <<'EOH'
  226.  
  227. This installation shell script will examine your system and ask you questions
  228. to determine how uumail and its auxiliary files should be installed.  If you
  229. get stuck on a question, you may use a ! shell escape to start a subshell or
  230. execute a command.  Many of the questions will have default answers in
  231. square brackets--typing carriage return will give you the default.
  232.  
  233. On some of the questions which ask for file or directory names you are
  234. allowed to use the ~name construct to specify the login directory belonging
  235. to "name", even if you don't have a shell which knows about that.  Questions
  236. where this is allowed will be marked "(~name ok)".
  237.  
  238. Much effort has been expended to ensure that this shell script will run
  239. on any Unix system.  If despite that it blows up on you, your best bet is
  240. to edit Configure and run it again.  (Trying to install uumail without having
  241. run Configure is well nigh impossible.)  Also, let me (sob@rice.edu) know
  242. how I blew it.
  243.  
  244. This installation script affects things in two ways: 1) it does direct
  245. variable substitutions on some of the files included in this kit, and
  246. 2) it builds a uuconf.h file for inclusion in C programs.  You may edit
  247. any of these files as the need arises after running this script.
  248.  
  249. EOH
  250. echo $n "[Type carriage return to continue] $c"
  251. . myread
  252.  
  253. : get old answers, if there is a config file out there
  254. if test -f config.sh; then
  255.     echo " "
  256.     echo "(Fetching default answers from your old config.sh file...)"
  257.     . config.sh
  258. fi
  259.  
  260. : get list of predefined functions in a handy place
  261. echo " "
  262. if test -f /lib/libc.a; then
  263.     echo "Your C library is in /lib/libc.a.  You're normal."
  264.     libc=/lib/libc.a
  265. else
  266.     if test -f /usr/lib/libc.a; then
  267.     echo "Your C library is in /usr/lib/libc.a, of all places."
  268.     libc=/usr/lib/libc.a
  269.     else
  270.     if test -f "$libc"; then
  271.         echo "Your C library is in $libc, like you said before."
  272.     else
  273.         cat <<'EOM'
  274.  
  275. I can't seem to find your C library.  I've looked for /lib/libc.a and
  276. /usr/lib/libc.a, but neither of those are there.  What is the full name
  277. EOM
  278.         echo $n "of your C library? $c"
  279.         . myread
  280.         libc="$ans"
  281.     fi
  282.     fi
  283. fi
  284. echo " "
  285. echo $n "Extracting names from $libc for later perusal...$c"
  286. if ar t $libc > libc.list; then
  287.     echo "done"
  288. else
  289.     echo " "
  290.     echo "The archiver doesn't think $libc is a reasonable library."
  291.     exit 1
  292. fi
  293.  
  294. : make some quick guesses about what we are up against
  295. echo " "
  296. echo $n "Hmm...  $c"
  297. if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then
  298.     echo "Looks kind of like a BSD system, but we'll see..."
  299.     echo exit 0 >bsd
  300.     echo exit 1 >usg
  301.     echo exit 1 >v7
  302. else
  303.     if $contains fcntl.o libc.list >/dev/null 2>&1 ; then
  304.     echo "Looks kind of like a USG system, but we'll see..."
  305.     echo exit 1 >bsd
  306.     echo exit 0 >usg
  307.     echo exit 1 >v7
  308.     else
  309.     echo "Looks kind of like a version 7 system, but we'll see..."
  310.     echo exit 1 >bsd
  311.     echo exit 1 >usg
  312.     echo exit 0 >v7
  313.     fi
  314. fi
  315. if $contains vmssystem.o libc.list >/dev/null 2>&1 ; then
  316.     cat <<'EOI'
  317. There is, however, a strange, musty smell in the air that reminds me of
  318. something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
  319. EOI
  320.     echo "exit 0" >eunice
  321.     eunicefix=unixtovms
  322.     eunice=define
  323. : it so happens the Eunice I know will not run shell scripts in Unix format
  324. else
  325.     echo " "
  326.     echo "Congratulations.  You aren't running Eunice."
  327.     eunicefix=':'
  328.     eunice=undef
  329.     echo "exit 1" >eunice
  330. fi
  331. chmod 755 bsd usg v7 eunice
  332. $eunicefix bsd usg v7 eunice
  333.  
  334. : see how we invoke the C preprocessor
  335. echo " "
  336. echo "Checking to see how your C preprocessor is invoked..."
  337. cat <<'EOT' >testcpp.c
  338. #define ABC abc
  339. #define XYZ xyz
  340. ABC+XYZ
  341. EOT
  342. echo 'Maybe "cc -E" will work...'
  343. cc -E testcpp.c >testcpp.out 2>&1
  344. if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  345.     echo "Yup, it does."
  346.     cpp='cc -E'
  347. else
  348.     echo 'Nope...maybe "cc -P" will work...'
  349.     cc -P testcpp.c >testcpp.out 2>&1
  350.     if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  351.     echo "Yup, that does."
  352.     cpp='cc -P'
  353.     else
  354.     echo 'Nixed again...maybe "/lib/cpp" will work...'
  355.     /lib/cpp testcpp.c >testcpp.out 2>&1
  356.     if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  357.         echo "Hooray, it works!  I was beginning to wonder."
  358.         cpp='/lib/cpp'
  359.     else
  360.         echo 'Hmm...maybe you already told me...'
  361.         case "$cpp" in
  362.         '') ;;
  363.         *) $cpp testcpp.c >testcpp.out 2>&1;;
  364.         esac
  365.         if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  366.         echo "Hooray, you did!  I was beginning to wonder."
  367.         else
  368.         echo "Nope. I can't find a C preprocessor.  Name one: $c"
  369.         . myread
  370.         cpp="$ans"
  371.         $cpp testcpp.c >testcpp.out 2>&1
  372.         if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  373.             echo "OK, that will do."
  374.         else
  375.             echo "Sorry, I can't get that to work.  Go find one."
  376.             exit 1
  377.         fi
  378.         fi
  379.     fi
  380.     fi
  381. fi
  382. rm -f testcpp.c testcpp.out
  383.  
  384. : check for pdp11
  385. echo " "
  386. if usg; then
  387.     : pdp11 is already defined
  388. else
  389.     cat <<'EOT' >pdp11.c
  390. #ifdef pdp11
  391. exit 0
  392. #else
  393. exit 1
  394. #endif
  395. EOT
  396.     $cpp pdp11.c | grep exit >pdp11
  397.     chmod 755 pdp11
  398.     $eunicefix pdp11
  399.     rm pdp11.c
  400. fi
  401. if pdp11; then
  402.     echo "This looks like a pdp11 to me."
  403. else
  404.     echo "This doesn't look like a pdp11 to me."
  405. fi
  406.  
  407. : see if sh knows # comments
  408. echo " "
  409. echo "Checking your sh to see if it knows about # comments..."
  410. if sh -c '#' >/dev/null 2>&1 ; then
  411.     echo "Your sh handles # comments correctly."
  412.     shsharp=true
  413.     spitshell=cat
  414.     echo " "
  415.     echo "Okay, let's see if #! works on this system..."
  416.     echo "#!/bin/echo hi" > try
  417.     $eunicefix try
  418.     chmod 755 try
  419.     try > today
  420.     if test -s today; then
  421.     echo "It does."
  422.     sharpbang='#!'
  423.     else
  424.     echo "#! /bin/echo hi" > try
  425.     $eunicefix try
  426.     chmod 755 try
  427.     try > today
  428.     if test -s today; then
  429.         echo "It does."
  430.         sharpbang='#! '
  431.     else
  432.         echo "It doesn't."
  433.         sharpbang=': use '
  434.     fi
  435.     fi
  436. else
  437.     echo "Your sh doesn't grok # comments--I will strip them later on."
  438.     shsharp=false
  439.     echo "exec grep -v '^#'" >spitshell
  440.     chmod 755 spitshell
  441.     $eunicefix spitshell
  442.     spitshell=`pwd`/spitshell
  443.     echo "I presume that if # doesn't work, #! won't work either!"
  444.     sharpbang=': use '
  445. fi
  446.  
  447. : figure out how to guarantee sh startup
  448. echo " "
  449. echo "Checking out how to guarantee sh startup..."
  450. startsh=$sharpbang'/bin/sh'
  451. echo "Let's see if '$startsh' works..."
  452. cat >try <<EOSS
  453. $startsh
  454. set abc
  455. test "$?abc" != 1
  456. EOSS
  457.  
  458. chmod 755 try
  459. $eunicefix try
  460. if try; then
  461.     echo "Yup, it does."
  462. else
  463.     echo "Nope.  You may have to fix up the shell scripts to make sure sh runs them."
  464. fi
  465. rm -f try today
  466.  
  467. : find out where common programs are
  468. echo " "
  469. echo "Locating common programs..."
  470. pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib"
  471. cat <<EOSC >loc
  472. $startsh
  473. thing=\$1
  474. shift
  475. dflt=\$1
  476. shift
  477. for dir in \$*; do
  478.     case "\$thing" in
  479.     .)
  480.     if test -d \$dir/\$thing; then
  481.         echo \$dir
  482.         exit 0
  483.     fi
  484.     ;;
  485.     *)
  486.     if test -f \$dir/\$thing; then
  487.         echo \$dir/\$thing
  488.         exit 0
  489.     fi
  490.     ;;
  491.     esac
  492. done
  493. echo \$dflt
  494. exit 1
  495. EOSC
  496. chmod 755 loc
  497. $eunicefix loc
  498. loclist="expr sed echo cat rm mv cp tail tr mkdir sort uniq grep"
  499. trylist="test egrep"
  500. for file in $loclist; do
  501.     xxx=`loc $file $file $pth`
  502.     eval $file=$xxx
  503.     case "$xxx" in
  504.     /*)
  505.     echo $file is in $xxx.
  506.     ;;
  507.     *)
  508.     echo "I don't know where $file is.  I hope it's in everyone's PATH."
  509.     ;;
  510.     esac
  511. done
  512. echo " "
  513. echo "Don't worry if any of the following aren't found..."
  514. for file in $trylist; do
  515.     xxx=`loc $file $file $pth`
  516.     eval $file=$xxx
  517.     case "$xxx" in
  518.     /*)
  519.     echo $file is in $xxx.
  520.     ;;
  521.     *)
  522.     echo "I don't see $file out there, offhand."
  523.     ;;
  524.     esac
  525. done
  526. case $egrep in
  527. egrep)
  528.     echo "Substituting grep for egrep."
  529.     egrep=$grep
  530.     ;;
  531. esac
  532. case $test in
  533. test)
  534.     echo "Hopefully test is built into your sh."
  535.     ;;
  536. /bin/test)
  537.     echo " "
  538.     echo $n 'Is your "test" built into sh? [n] (OK to guess) '"$c"
  539.     . myread
  540.     case $ans in
  541.     y*) test=test ;;
  542.     esac
  543.     ;;
  544. *)
  545.     test=test
  546.     ;;
  547. esac
  548. case $echo in
  549. echo)
  550.     echo "Hopefully echo is built into your sh."
  551.     ;;
  552. /bin/echo)
  553.     echo " "
  554.     echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
  555.     $echo $n "hi there$c" >foo1
  556.     echo $n "hi there$c" >foo2
  557.     if cmp foo1 foo2 >/dev/null 2>&1; then
  558.     echo "They are compatible.  In fact, they may be identical."
  559.     else
  560.     echo "They are not compatible--the echo builtin will be used."
  561.     echo=echo
  562.     fi
  563.     $rm -f foo1 foo2
  564.     ;;
  565. *)
  566.     echo=echo
  567.     ;;
  568. esac
  569.  
  570. : decide how portable to be
  571. case "$portable" in
  572. define) dflt=y;;
  573. *)    dflt=n;;
  574. esac
  575. $cat <<'EOH'
  576.  
  577. I can set things up so that your shell scripts and binaries are more portable,
  578. at what may be a noticable cost in performance.  In particular, if you
  579. ask to be portable, the following happens:
  580.  
  581.      1) ~username interpretations will be done at run time rather than
  582.     by Configure.
  583.      2) the system name will be determined at run time, if at all possible.
  584.  
  585. EOH
  586. $echo $n "Do you expect to run these scripts and binaries on multiple machines? [$dflt] $c"
  587. . myread
  588. case $ans in
  589. '') ans=$dflt;;
  590. esac
  591. case $ans in
  592.     y*) portable=define
  593.     for file in $loclist; do
  594.         eval $file=$file
  595.     done
  596.     ;;
  597.     *)  portable=undef ;;
  598. esac
  599.  
  600. : set up shell script to do ~ expansion
  601. cat >filexp <<EOSS
  602. $startsh
  603. : expand filename
  604. case \$1 in
  605.  ~/*|~)
  606.     $echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
  607.     ;;
  608.  ~*)
  609.     if $test -f /bin/csh; then
  610.     /bin/csh -f -c "glob \$1"
  611.     $echo ""
  612.     else
  613.     name=\`$expr x\$1 : '..\([^/]*\)'\`
  614.     dir=\`$sed </etc/passwd -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}'\`
  615.     if $test ! -d "\$dir"; then
  616.         me=\`basename \$0\`
  617.         $echo "\$me: can't locate home directory for: \$name" >&2
  618.         exit 1
  619.     fi
  620.     case \$1 in
  621.     */*)
  622.         $echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
  623.         ;;
  624.     *)
  625.         $echo \$dir
  626.         ;;
  627.     esac
  628.     fi
  629.     ;;
  630. *)
  631.     $echo \$1
  632.     ;;
  633. esac
  634. EOSS
  635. chmod 755 filexp
  636. $eunicefix filexp
  637.  
  638. : now get the site name
  639. $echo " "
  640. $echo "Figuring out site name..."
  641. $echo 'Maybe "hostname" will work...'
  642. if ans=`sh -c hostname 2>&1` ; then
  643.     sitename=$ans
  644.     hostcmd=hostname
  645. else
  646.     $echo 'No, maybe "uuname -l" will work...'
  647.     if ans=`sh -c 'uuname -l' 2>&1` ; then
  648.     sitename=$ans
  649.     hostcmd='uuname -l'
  650.     else
  651.     $echo 'Strange.  Maybe "uname -n" will work...'
  652.     if ans=`sh -c 'uname -n' 2>&1` ; then
  653.         sitename=$ans
  654.         hostcmd='uname -n'
  655.     else
  656.         $echo 'Oh well, maybe I can mine it out of whoami.h...'
  657.         if ans=`sh -c $contains' sysname /usr/include/whoami.h' 2>&1` ; then
  658.         sitename=`$echo "$ans" | $sed 's/^.*"\(.*\)"/\1/'`
  659.         hostcmd="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' </usr/include/whoami.h"
  660.         else
  661.         case "$sitename" in
  662.         '') $echo "Does this machine have an identity crisis or something?"
  663.             hostcmd=''
  664.             ;;
  665.         *)  $echo "Well, you said $sitename before...";;
  666.         esac
  667.         fi
  668.     fi
  669.     fi
  670. fi
  671. : you do not want to know about this
  672. set $sitename
  673. sitename=$1
  674.  
  675. : translate upper to lower if necessary
  676. case $sitename in
  677.     *[A-Z]*)
  678.     sitename=`$echo $sitename | tr '[A-Z]' '[a-z]'`
  679.     $echo "(Normalizing case in your site name)"
  680.     ;;
  681. esac
  682.  
  683. : verify guess
  684. if $test "$sitename" ; then
  685.     $echo 'Your site name appears to be "'$sitename'".'
  686.     $echo $n "Is this correct? [y] $c"
  687.     . myread
  688.     case $ans in
  689.       y*|'')  ;;
  690.       *)      sitename='' ;;
  691.     esac
  692. fi
  693.  
  694. : bad guess or no guess
  695. while $test "X$sitename" = X ; do
  696.     $echo $n "Please type the (one word) name of your site: $c"
  697.     . myread
  698.     sitename="$ans"
  699.     case $hostcmd in
  700.     sed*)
  701.     $echo "(That doesn't agree with your whoami.h file, by the way.)"
  702.     ;;
  703.     *)
  704.     $echo "(That doesn't agree with your $hostcmd command, by the way.)"
  705.     ;;
  706.     esac
  707.     hostcmd=''
  708. done
  709. : figure out knownhost
  710. case "$knownhost" in
  711. '')
  712.     dflt=none
  713.     ;;
  714. *)  dflt=$knownhost ;;
  715. esac
  716.  
  717. knownhost=''
  718.  
  719. : get uucp neighbors
  720. $echo " "
  721. $echo $n "Getting a list of uucp neighbors... $c"
  722. if uuname >uucp.local; then
  723.     $echo "done"
  724. else
  725.     $echo " "
  726.     $echo "I cannot seem to find a list of your uucp neighbors!"
  727.     exit 1
  728. fi
  729.  
  730. testd=''
  731. useknownhost=''
  732. while $test "X$useknownhost" = X; do
  733. cat <<'EOUUCP'
  734. There may be some mail that your site cannot route. Uumail will send
  735. the mail to a neighbor for routing. Please enter the name of a 
  736. EOUUCP
  737. $echo $n "uucp neighbor to which unresolved mail may be routed: [$dflt] $c"
  738. . myread
  739. case "$ans" in
  740. '') ans=$dflt;;
  741. esac
  742. if $test "$ans" = 'none'; then
  743.     $echo "OK, you'll have to manually handle unknown routes yourself."
  744.     useknownhost=undef
  745.     knownhost=''
  746. else
  747.     if $contains "$ans" uucp.local >/dev/null 2>&1; then
  748.     $echo "OK, $ans will be used when $sitename cannot find a route"
  749.     useknownhost=define
  750.     knownhost="$ans"
  751.     else
  752.     $echo "$ans does not appear to be a uucp neighbor... try again"
  753.     fi
  754. fi
  755. done
  756.  
  757. : figure out uucp library location
  758. case "$lib" in
  759. '')
  760.     dflt=/usr/lib/uucp
  761.     ;;
  762. *)  dflt=$lib ;;
  763. esac
  764. libexp=$lib
  765. libexp='blurfl/dyick'
  766. while $test ! -d "$libexp"; do
  767.     $echo " "
  768.     case "$libexp" in
  769.     blurfl*) ;;
  770.     *) $echo "Directory $libexp not found";;
  771.     esac
  772.     $echo $n "Where is your uucp library (~name okay)? [$dflt] $c"
  773.     . myread
  774.     case "$ans" in
  775.     '') ans="$dflt";;
  776.     esac
  777.     lib="$ans"
  778.     case $database in
  779.     ~*)
  780.     libexp=`filexp $lib`
  781.     $echo "(That is $libexp on this particular system.)"
  782.     case $portable in
  783.       undef) lib=$libexp ;;
  784.     esac
  785.     ;;
  786.     *)
  787.     libexp=$lib
  788.     ;;
  789.     esac
  790. done
  791. : are we going to keep a log
  792. case "$log" in
  793. define) dflt=y;;
  794. *)    dflt=n;;
  795. esac
  796.  
  797. $echo $n "Do you want to maintain a log of uumail transactions? [$dflt] $c"
  798. . myread
  799. case "$ans" in
  800.     '') ans=$dflt;;
  801. esac
  802. case $ans in
  803.     y*)log=define;;
  804.     *)log=undef;;
  805. esac
  806.  
  807. if $test "X$log" = Xdefine ; then
  808. : figure out logfile location
  809. case "$logfile" in
  810. '')
  811.     dflt=/usr/adm/uumail.log
  812.     ;;
  813. *)  dflt=$logfile ;;
  814. esac
  815. libexp=$logfile
  816. libexp='blurfl/dyick'
  817. while $test ! -f "$libexp"; do
  818.     $echo " "
  819.     case "$libexp" in
  820.     blurfl*) ;;
  821.     *) $echo "File $libexp not found";;
  822.     esac
  823.     $echo $n "Where is your uumail log file (~name okay)? [$dflt] $c"
  824.     . myread
  825.     case "$ans" in
  826.     '') ans="$dflt";;
  827.     esac
  828.     logfile="$ans"
  829.     case $logfile in
  830.     ~*)
  831.     libexp=`filexp $logfile`
  832.     $echo "(That is $libexp on this particular system.)"
  833.     case $portable in
  834.       undef) logfile=$libexp ;;
  835.     esac
  836.     ;;
  837.     *)
  838.     libexp=$logfile
  839.     ;;
  840.     esac
  841. done
  842. fi
  843. $echo "Determining the format of the routing database..."
  844. $echo $n "Looking for dbm library... $c"
  845. : see if there are database libraries
  846. if $test -r /usr/lib/libdbm.a || $test -r /usr/local/lib/libdbm.a ; then
  847.     $echo "found."
  848.     if $test -r /usr/lib/libdbm.a; then
  849.     libdbm='-ldbm'
  850.     else
  851.     libdbm="/usr/local/lib/libdbm.a"
  852.     fi
  853.     usedbm=define
  854. else
  855.     $echo " "
  856.     libdbm=''
  857.     usedbm=undef
  858.     if $contains dbminit.o libc.list >/dev/null 2>&1 ; then
  859.     $echo "No dbm library found, but you have dbminit() so we'll use that."
  860.     usedbm=define
  861.     else
  862.     $echo "No dbm library found -- assuming database in text format"
  863.     usedbm=undef
  864.     fi
  865. fi
  866.  
  867. : figure out database location
  868. case "$database" in
  869. '')
  870.     dflt=$lib/paths
  871.     ;;
  872. *)  dflt=$database ;;
  873. esac
  874. if $test "X$usedbm" = Xdefine ;then
  875.     database="$database.pag"
  876. fi
  877.  
  878. libexp='blurfl/dyick'
  879. while $test ! -f "$libexp"; do
  880.     $echo " "
  881.     case "$libexp" in
  882.     blurfl*) ;;
  883.     *) $echo "File $libexp not found";;
  884.     esac
  885.     $echo $n "Where is your uucp map database (~name okay)? [$dflt] $c"
  886.     . myread
  887.     case "$ans" in
  888.     '') ans="$dflt";;
  889.     esac
  890.     database="$ans"
  891.     case $database in
  892.     ~*)
  893.     libexp=`filexp $database`
  894.     $echo "(That is $libexp on this particular system.)"
  895.     case $portable in
  896.       undef) database=$libexp ;;
  897.     esac
  898.     ;;
  899.     *)
  900.     libexp=$database
  901.     ;;
  902.     esac
  903. done
  904.  
  905. testd=`$echo "$database" | $sed 's/.pag\$//'`
  906.  
  907. : we assume the pathalias database is there already
  908. if $test ! -f "$testd.pag" ; then
  909.     libdbm=''
  910.     usedbm=undef
  911.     $echo "Database $database not in dbm format."
  912.     : is the database sorted?
  913.     case "$sorted" in
  914.     define) dflt=y;;
  915.     *)    dflt=n;;
  916.     esac
  917.  
  918.     $echo $n "Is database $database sorted? [$dflt] $c"
  919.     . myread
  920.     case "$ans" in
  921.         '') ans=$dflt;;
  922.     esac
  923.     case "$ans" in
  924.         y*)sorted=define;;
  925.         *)sorted=undef;;
  926.     esac
  927. else
  928.     database="$testd"
  929. fi
  930.  
  931. : ensure 'sorted' has a value
  932. case "$sorted" in
  933.     '') sorted=undef
  934. esac
  935.  
  936. : are we going to use aliasing and forwarding
  937. case "$noalias" in
  938. define) dflt=n;;
  939. *)    dflt=y;;
  940. esac
  941.  
  942. $echo $n "Do you want to use uumail to alias and forward mail? [$dflt] $c"
  943. . myread
  944. case "$ans" in
  945.     '') ans=$dflt;;
  946. esac
  947. case $ans in
  948.     n*)noalias=define;;
  949.     *)noalias=undef;;
  950. esac
  951. if $test "X$noalias" = Xundef ; then
  952. : figure out aliases location
  953. case "$aliases" in
  954. '')
  955.     dflt=$lib/Aliases
  956.     ;;
  957. *)  dflt=$aliases
  958.     ;;
  959. esac
  960. : libexp=$aliases
  961. libexp='blurfl/dyick'
  962. while $test ! -f "$libexp"; do
  963.     $echo " "
  964.     case "$libexp" in
  965.     blurfl*) ;;
  966.     *) $echo "File $libexp not found";;
  967.     esac
  968.     $echo $n "Where is your aliases file (~name okay)? [$dflt] $c"
  969.     . myread
  970.     case "$ans" in
  971.     '') ans="$dflt";;
  972.     esac
  973.     aliases="$ans"
  974.     case $aliases in
  975.     ~*)
  976.     libexp=`filexp $aliases`
  977.     $echo "(That is $libexp on this particular system.)"
  978.     case $portable in
  979.       undef) aliases=$libexp ;;
  980.     esac
  981.     ;;
  982.     *)
  983.     libexp=$aliases
  984.     ;;
  985.     esac
  986. done
  987. fi
  988. : Shall we compile in the debugging information
  989. case "$debug" in
  990.     define) dflt=y;;
  991.     *)    dflt=n;;
  992. esac
  993.  
  994. $echo $n "Want the debugging information compiled in? [$dflt] $c"
  995. . myread
  996. case "$ans" in
  997.     '') ans=$dflt;;
  998. esac
  999. case $ans in
  1000.     y*)debug=define;;
  1001.     *)debug=undef;;
  1002. esac
  1003.  
  1004. : figure out local delivery program
  1005. case "$localmail" in
  1006. '')
  1007.     dflt=/bin/mail
  1008.     ;;
  1009. *)  dflt="$localmail"
  1010.     ;;
  1011. esac
  1012. : libexp="$localmail"
  1013. libexp='blurfl/dyick'
  1014. while $test ! -f "$libexp"; do
  1015.     $echo " "
  1016.     case "$libexp" in
  1017.     blurfl*) ;;
  1018.     *) $echo "File $libexp not found";;
  1019.     esac
  1020.     $echo $n "What is the name of the local mail delivery program (~name okay)? [$dflt] $c"
  1021.     . myread
  1022.     case "$ans" in
  1023.     '') ans="$dflt";;
  1024.     esac
  1025.     localmail="$ans"
  1026.     case $localmail in
  1027.     ~*)
  1028.     libexp=`filexp $localmail`
  1029.     $echo "(That is $libexp on this particular system.)"
  1030.     case $portable in
  1031.       undef) localmail="$libexp" ;;
  1032.     esac
  1033.     ;;
  1034.     *)
  1035.     libexp="$localmail"
  1036.     ;;
  1037.     esac
  1038. done
  1039.  
  1040. : Do we need any special flags when calling the localmailer
  1041. case "$localflags" in
  1042.     '') dflt=none;;
  1043.     *) dflt=$localflags;;
  1044. esac
  1045.  
  1046. $echo $n "Please enter any special flags needed when calling $localmail: [$dflt] $c"
  1047. . myread
  1048. case "$ans" in
  1049.     '') ans='';;
  1050. esac
  1051. case $ans in
  1052.     -*)localflags=$ans;;
  1053.     *)localflags='';;
  1054. esac
  1055.  
  1056.  
  1057.  
  1058.  
  1059. : determine where manual pages go
  1060. case "$mansrc" in
  1061. '')
  1062.     dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
  1063.     ;;
  1064. *)  dflt="$mansrc"
  1065.     ;;
  1066. esac
  1067. mansrc='blurfl/dyick'
  1068. while $test ! -d "$mansrc" ; do
  1069.     case $mansrc in
  1070.       blurfl*) ;;
  1071.       *) $echo "$mansrc does not appear to exist." ;;
  1072.     esac
  1073.     $echo " "
  1074.     $echo $n "Where do the manual pages (source) go? [$dflt] $c"
  1075.     . myread
  1076.     mansrc=`filexp "$ans"`
  1077.     case $mansrc in
  1078.       '') mansrc=$dflt ;;
  1079.     esac
  1080. done
  1081. case "$mansrc" in
  1082. *l)
  1083.     manext=l
  1084.     ;;
  1085. *n)
  1086.     manext=n
  1087.     ;;
  1088. *)
  1089.     manext=1
  1090.     ;;
  1091. esac
  1092.  
  1093. : determine where mail is spooled
  1094. case "$maildir" in
  1095. '')
  1096.     dflt=`loc . /usr/spool/mail /usr/spool/mail /usr/mail`
  1097.     ;;
  1098. *)  dflt="$maildir"
  1099.     ;;
  1100. esac
  1101. maildir='blurfl/dyick'
  1102. while $test ! -d "$maildir" ; do
  1103.     case $maildir in
  1104.       blurfl*) ;;
  1105.       *) $echo "$maildir does not appear to exist." ;;
  1106.     esac
  1107.     $echo " "
  1108.     $echo $n "Where is yet-to-be-read mail spooled? [$dflt] $c"
  1109.     . myread
  1110.     maildir=`filexp "$ans"`
  1111.     case $maildir in
  1112.       '') maildir=$dflt ;;
  1113.     esac
  1114. done
  1115.  
  1116. : find out how to find out full name
  1117. $echo " "
  1118. case "$berkname" in
  1119. define)
  1120.     dflt=y;;
  1121. undef)
  1122.     dflt=n;;
  1123. *)
  1124.     if bsd; then
  1125.     dflt=y
  1126.     else
  1127.     dflt=n
  1128.     fi
  1129.     ;;
  1130. esac
  1131. $echo "Does your /etc/passwd file keep full names in Berkeley/V7 format (name first"
  1132. $echo $n "thing after ':' in GCOS field)? [$dflt] $c"
  1133. . myread
  1134. case $ans in
  1135.   '') ans=$dflt ;;
  1136. esac
  1137. case $ans in
  1138.   y*)
  1139.     passnam=define
  1140.     berknam=define
  1141.     usgnam=undef
  1142.     nametype=bsd
  1143.     ;;
  1144.   *)
  1145.     $echo " "
  1146.     case "$usgname" in
  1147.     define)
  1148.     dflt=y;;
  1149.     undef)
  1150.     dflt=n;;
  1151.     *)
  1152.     if usg; then
  1153.         dflt=y
  1154.     else
  1155.         dflt=n
  1156.     fi
  1157.     ;;
  1158.     esac
  1159.     $echo "Does your passwd file keep full names in USG format (name sandwiched"
  1160.     $echo $n "between a '-' and a '(')? [$dflt] $c"
  1161.     . myread
  1162.     case $ans in
  1163.       '') ans=$dflt ;;
  1164.     esac
  1165.     case $ans in
  1166.       n*)
  1167.     $echo "Full name will be taken from ~/.fullname"
  1168.     passnam=undef
  1169.     berknam=undef
  1170.     usgnam=undef
  1171.     nametype=other
  1172.     ;;
  1173.       *)
  1174.     passnam=define
  1175.     berknam=undef
  1176.     usgnam=define
  1177.     nametype=usg
  1178.     ;;
  1179.     esac
  1180.     ;;
  1181. esac
  1182.  
  1183. : figure out mailer daemons name
  1184. case "$mailadmin" in
  1185. '')
  1186.     dflt=MAILER-DAEMON
  1187.     ;;
  1188. *)  dflt="$mailadmin"
  1189.     ;;
  1190. esac
  1191. $echo $n "What is the name of the mail subsystem? [$dflt] $c"
  1192. . myread
  1193. case "$ans" in
  1194.     '') ans="$dflt"
  1195.     ;;
  1196. esac
  1197. mailadmin="$ans"
  1198.  
  1199.  
  1200. : see if we need a special compiler
  1201. $echo " "
  1202. if usg; then
  1203.     case "$cc" in
  1204.     '')
  1205.     case "$Mcc" in
  1206.     /*) dflt='Mcc'
  1207.         ;;
  1208.     *)
  1209.         if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
  1210.         dflt='cc -M'
  1211.         else
  1212.         dflt='cc'
  1213.         fi
  1214.         ;;
  1215.     esac
  1216.     ;;
  1217.     *)  dflt="$cc";;
  1218.     esac
  1219.     $cat <<'EOM'
  1220.  
  1221. On some systems the default C compiler will not resolve multiple global
  1222. references that happen to have the same name.  On some such systems the
  1223. "Mcc" command may be used to force these to be resolved.  On other systems
  1224. a "cc -M" command is required.  What command will force resolution on
  1225. EOM
  1226.     $echo $n "this system? [$dflt] $c"
  1227.     . myread
  1228.     cc="$ans"
  1229.     case "$cc" in
  1230.     '') cc="$dflt" ;;
  1231.     esac
  1232. else
  1233.     $echo "Not a USG system--assuming cc can resolve multiple definitions."
  1234.     cc=cc
  1235. fi
  1236.  
  1237. : see if we should throw a -i into the Makefile
  1238. $echo " "
  1239. if pdp11; then
  1240.     if $contains '\-i' $mansrc/cc.1 >/dev/null 2>&1 ; then
  1241.     $echo $n "Your system appears to have separate I and D space.  Is this true? [y] $c"
  1242.     . myread
  1243.     case $ans in
  1244.         n*|f*) iandd='' ;;
  1245.         *)     iandd='-i' ;;
  1246.     esac
  1247.     else
  1248.     $echo "Your system appears to NOT have separate I and D space."
  1249.     $echo $n "Is this correct? [y] $c"
  1250.     . myread
  1251.     case $ans in
  1252.         n*|f*) iandd='-i' ;;
  1253.         *)     iandd='' ;;
  1254.     esac
  1255.     fi
  1256. else
  1257.     $echo "Not a pdp11--assuming no separate I and D."
  1258. fi
  1259.  
  1260. : index or strcpy
  1261. $echo " "
  1262. if $contains index.o libc.list >/dev/null 2>&1 ; then
  1263.     $echo "Your system appears to use index() and rindex() rather than strchr()"
  1264.     $echo $n "and strrchr().  Is this correct? [y] $c"
  1265.     . myread
  1266.     case $ans in
  1267.     n*|f*) strchr='define' ;;
  1268.     *)     strchr='undef' ;;
  1269.     esac
  1270. else
  1271.     $echo "Your system appears to use strchr() and strrchr() rather than index()"
  1272.     $echo $n "and rindex().  Is this correct? [y] $c"
  1273.     . myread
  1274.     case $ans in
  1275.     n*|f*) strchr=undef ;;
  1276.     *)     strchr=define ;;
  1277.     esac
  1278. fi
  1279.  
  1280. : see if there is a whoami file
  1281. if $test -r /usr/include/whoami.h ; then
  1282.     whoami=define
  1283.     $echo "whoami.h found."
  1284. else
  1285.     whoami=undef
  1286. fi
  1287.  
  1288. : see if this is a termio system
  1289. if $test -r /usr/include/fcntl.h ; then
  1290.     fcntl=define
  1291.     $echo "fcntl.h found."
  1292. else
  1293.     fcntl=undef
  1294.     $echo "No fcntl.h found, but that's ok."
  1295. fi
  1296.  
  1297. : see if ioctl defs are in sgtty/termio or sys/ioctl
  1298. if $test -r /usr/include/sys/ioctl.h ; then
  1299.     ioctl=define
  1300.     $echo "sys/ioctl.h found."
  1301. else
  1302.     ioctl=undef
  1303.     $echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
  1304. fi
  1305.  
  1306. : see if sysexits.h is out there
  1307. if $test -r /usr/include/sysexits.h; then
  1308.     sysexits=define
  1309.     $echo "sysexits.h found."
  1310. else
  1311.     sysexits=undef
  1312.     $echo "sysexits not found, added needed flags to uuconf.h"
  1313. fi
  1314.  
  1315. : see if there is a vfork
  1316. if $contains vfork.o libc.list >/dev/null 2>&1 ; then
  1317.     $echo "vfork() found."
  1318.     novfork='undef'
  1319. else
  1320.     $echo "No vfork() found--will use fork() instead."
  1321.     novfork='define'
  1322. fi
  1323.  
  1324. : see if there is a getpw
  1325. if $contains getpw.o libc.list >/dev/null 2>&1 ; then
  1326.     $echo "getpw() found."
  1327.     getpwent='undef'
  1328. else
  1329.     $echo "No getpw() found--will use getpwent() instead."
  1330.     getpwent='define'
  1331. fi
  1332.  
  1333. : see how we will look up site name
  1334. douname=undef
  1335. gethostname=undef
  1336. phostname=undef
  1337. if $contains gethostname.o libc.list >/dev/null 2>&1 ; then
  1338.     $echo "gethostname() found."
  1339.     gethostname=define
  1340. else
  1341.     if $contains uname.o libc.list >/dev/null 2>&1 ; then
  1342.     $echo "uname() found."
  1343.     douname=define
  1344.     else
  1345.     case $hostcmd in
  1346.       '') ;;
  1347.       *)
  1348.         $cat <<EOT
  1349.  
  1350. There is no gethostname() or uname() on this system.  You have two
  1351. possibilites at this point:
  1352.  
  1353. 1)  You can have your site name ($sitename) compiled into uumail, which lets rn
  1354.     start up faster, but makes your binaries non-portable, or
  1355. 2)  you can have uumail use a
  1356.     
  1357.     popen("$hostcmd","r")
  1358.  
  1359.     which will start slower but be more portable.
  1360.  
  1361. Option 1 will use whoami.h if you have one.  If you want option 2 but with
  1362. a different command, you can edit uuconf.h after this shell script is done.
  1363.  
  1364. EOT
  1365.         case "$phostname" in
  1366.         define) dflt=n;;
  1367.         undef)  dflt=y;;
  1368.         '')
  1369.         case $portable in
  1370.         define) dflt=n ;;
  1371.         *)      dflt=y ;;
  1372.         esac
  1373.         ;;
  1374.         esac
  1375.         $echo $n "Do you want your site name compiled in? [$dflt] $c"
  1376.         . myread
  1377.         case $ans in
  1378.         '') ans=$dflt;;
  1379.         esac
  1380.         case $ans in
  1381.           n*) phostname=define ;;
  1382.           *)  hostcmd='' phostname=undef;;
  1383.         esac
  1384.         ;;
  1385.     esac
  1386.     case $hostcmd in
  1387.       '')
  1388.         case $whoami in
  1389.           define)
  1390.         $echo 'No hostname function--using whoami.h.'
  1391.         ;;
  1392.           undef)
  1393.         $echo 'No hostname function--hardwiring "'$sitename'".'
  1394.         ;;
  1395.         esac
  1396.         ;;
  1397.     esac
  1398.     fi
  1399. fi
  1400.  
  1401. : see if there are directory access routines out there
  1402. if $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a ; then
  1403.     $echo "Ndir library found."
  1404.     if $test -r /usr/lib/libndir.a; then
  1405.     ndirlib='-lndir'
  1406.     else
  1407.     ndirlib="/usr/local/lib/libndir.a"
  1408.     fi
  1409.     libndir=define
  1410.     usendir=undef
  1411.     ndirc=''
  1412.     ndiro=''
  1413. else
  1414.     ndirlib=''
  1415.     libndir=undef
  1416.     if $contains readdir.o libc.list >/dev/null 2>&1 ; then
  1417.     $echo "No ndir library found, but you have readdir() so we'll use that."
  1418.     usendir=undef
  1419.     ndirc=''
  1420.     ndiro=''
  1421.     else
  1422.     $echo "No ndir library found and no readdir() found--using ./ndir.c."
  1423.     usendir=define
  1424.     ndirc='ndir.c'
  1425.     ndiro='ndir.o'
  1426.     fi
  1427. fi
  1428. : check for void type
  1429. $echo " "
  1430. $echo "Checking to see if your C compiler groks the void type..."
  1431. $cat >try.c <<'EOCP'
  1432. void main();
  1433. EOCP
  1434. if cc -c try.c >/dev/null 2>&1 ; then
  1435.     novoid='undef'
  1436.     $echo "Yup, it does."
  1437. else
  1438.     novoid='define'
  1439.     $echo "Nope, it doesn't (boo hiss).  I will substitute int."
  1440. fi
  1441. $rm try.*
  1442.  
  1443. : determine mailer for uumail to use to return mail
  1444. $echo " "
  1445. if $test -f /usr/lib/sendmail; then
  1446.     mailer=/usr/lib/sendmail
  1447.     resolve=undef
  1448.     returnmail=undef
  1449. else
  1450.     if usg && $test -f $libexp/recmail; then
  1451.     mailer=$libexp/recmail
  1452.     else
  1453.     mailer=$lib/uumail
  1454.     fi
  1455.     resolve=define
  1456.     returnmail=define
  1457. fi
  1458. $echo "Mail sender is $mailer"
  1459.  
  1460. : check for internet mailer
  1461. case "$internet" in
  1462. define) dflt=y;;
  1463. undef)    dflt=n;;
  1464. *)    dflt=n;;
  1465. esac
  1466. cat <<EOM
  1467.  
  1468. Some newer mailers can deliver mail to addresses of the INTERNET persuasion,
  1469. such as user@host.UUCP.  Other older mailers require the complete path
  1470. to the destination to be specified in the address.  Does your mailer
  1471. EOM
  1472. $echo $n "(`basename $mailer`) understand INTERNET addresses? [$dflt] $c"
  1473. . myread
  1474. case "$ans" in
  1475. '') ans=$dflt;;
  1476. esac
  1477. case "$ans" in
  1478. y*) internet=define;;
  1479. *)  internet=undef;;
  1480. esac
  1481.  
  1482.  
  1483. if $test X$internet = Xdefine && $test `basename $mailer` = uumail
  1484. then 
  1485. resolve=define
  1486. else
  1487. : shall uumail resolve addreses or just supply routes
  1488. case "$resolve" in
  1489.     define) dflt=y;;
  1490.     *)    dflt=n;;
  1491. esac
  1492.  
  1493. cat <<'EOUUMAIL'
  1494.  
  1495. Uumail is capable of resolving addresses in domain form (user@site.domain)
  1496. however, some people who use sendmail prefer to use uumail just to provide
  1497. uucp paths.
  1498. EOUUMAIL
  1499. $echo $n "Shall uumail resolve addresses? [$dflt] $c"
  1500. . myread
  1501. case "$ans" in
  1502.     '') ans=$dflt;;
  1503. esac
  1504. case $ans in
  1505.     y*)resolve=define;;
  1506.     *)resolve=undef;;
  1507. esac
  1508. fi
  1509.  
  1510. : determine where public executables go
  1511. case "$bindir" in
  1512. '')
  1513.     dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
  1514.     ;;
  1515. *)  dflt="$bindir"
  1516.     ;;
  1517. esac
  1518. bindir='blurfl/dyick'
  1519. while $test ! -d "$bindir" ; do
  1520.     case $bindir in
  1521.       blurfl*) ;;
  1522.       *) $echo "$bindir does not appear to exist." ;;
  1523.     esac
  1524.     $echo " "
  1525.     $echo $n "Where do you want to put the public executables? [$dflt] $c"
  1526.     . myread
  1527.     bindir="$ans"
  1528.     bindir=`filexp $bindir`
  1529.     case $bindir in
  1530.       '') bindir=$dflt ;;
  1531.     esac
  1532. done
  1533.  
  1534.  
  1535. : determine root id
  1536. rootid=`$sed </etc/passwd -e "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e "q" -e "}" -e "d"`
  1537. case $rootid in
  1538.   '') rootid=0 ;;
  1539.   *)  $echo "Root uid = $rootid" ;;
  1540. esac
  1541.  
  1542. : weed out incompatibilities
  1543. case $douname in
  1544.   define) whoami=undef ;;
  1545. esac
  1546.  
  1547. : preserve RCS keywords in files with variable substitution, grrr
  1548. Log='$Log'
  1549. Header='$Header'
  1550.  
  1551. : Warnings
  1552. if v7; then
  1553.     cat <<'EOM'
  1554.  
  1555. NOTE: the V7 compiler may ignore some #undefs that uumail uses.  If so, you will
  1556. get messages about redefining EXT.  Some V7 compilers also have difficulties
  1557. with #defines near buffer boundaries, so beware.  You may have to play with
  1558. the spacing in common.h.
  1559. EOM
  1560. fi
  1561.  
  1562. if pdp11; then
  1563.     cat <<'EOM'
  1564.  
  1565.  
  1566. EOM
  1567. fi
  1568.  
  1569. $echo " "
  1570. $echo "End of configuration questions."
  1571. $echo " "
  1572.  
  1573. : create config.sh file
  1574. $echo " "
  1575. $echo "Creating config.sh..."
  1576. $spitshell <<EOT >config.sh
  1577. $startsh
  1578. # config.sh
  1579. # This file was produced by running the Configure script.
  1580.  
  1581. n='$n'
  1582. c='$c'
  1583. libc='$libc'
  1584. eunicefix='$eunicefix'
  1585. eunice='$eunice'
  1586. cpp='$cpp'
  1587. sysexits='$sysexits'
  1588. shsharp='$shsharp'
  1589. startsh='$startsh'
  1590. spitshell='$spitshell'
  1591. test='$test'
  1592. expr='$expr'
  1593. sed='$sed'
  1594. echo='$echo'
  1595. cat='$cat'
  1596. rm='$rm'
  1597. mv='$mv'
  1598. cp='$cp'
  1599. debug='$debug'
  1600. resolve='$resolve'
  1601. sorted='$sorted'
  1602. log='$log'
  1603. tail='$tail'
  1604. tr='$tr'
  1605. mkdir='$mkdir'
  1606. sort='$sort'
  1607. uniq='$uniq'
  1608. grep='$grep'
  1609. egrep='$egrep'
  1610. contains='$contains'
  1611. libdbm='$libdbm'
  1612. libexp='$libexp'
  1613. nametype='$nametype'
  1614. cc='$cc'
  1615. iandd='$iandd'
  1616. useknownhost='$useknownhost'
  1617. knownhost='$knownhost'
  1618. ndirlib='$ndirlib'
  1619. libndir='$libndir'
  1620. usendir='$usendir'
  1621. ndirc='$ndirc'
  1622. ndiro='$ndiro'
  1623. mailer='$mailer'
  1624. localmail='$localmail'
  1625. localflags='$localflags'
  1626. internet='$internet'
  1627. returnmail='$returnmail'
  1628. bindir='$bindir'
  1629. filexp='$filexp'
  1630. Log='$Log'
  1631. Header='$Header'
  1632. sitename='$sitename'
  1633. orgname='$orgname'
  1634. mailadmin='$mailadmin'
  1635. lib='$lib'
  1636. mansrc='$mansrc'
  1637. manext='$manext'
  1638. maildir='$maildir'
  1639. spool='$spool'
  1640. active='$active'
  1641. myactive='$myactive'
  1642. mininact='$mininact'
  1643. pref='$pref'
  1644. defeditor='$defeditor'
  1645. rootid='$rootid'
  1646. mboxchar='$mboxchar'
  1647. locpref='$locpref'
  1648. orgpref='$orgpref'
  1649. citypref='$citypref'
  1650. statepref='$statepref'
  1651. cntrypref='$cntrypref'
  1652. contpref='$contpref'
  1653. strchr='$strchr'
  1654. novoid='$novoid'
  1655. novfork='$novfork'
  1656. portable='$portable'
  1657. passnam='$passnam'
  1658. berknam='$berknam'
  1659. usgnam='$usgnam'
  1660. whoami='$whoami'
  1661. termio='$termio'
  1662. fcntl='$fcntl'
  1663. ioctl='$ioctl'
  1664. database='$database'
  1665. logfile='$logfile'
  1666. noalias='$noalias'
  1667. aliases='$aliases'
  1668. havetlib='$havetlib'
  1669. getpwent='$getpwent'
  1670. gethostname='$gethostname'
  1671. douname='$douname'
  1672. phostname='$phostname'
  1673. hostcmd='$hostcmd'
  1674. norelay='$norelay'
  1675. CONFIG=true
  1676. EOT
  1677.  
  1678. : create uuconf.h file
  1679. $echo " "
  1680. $echo "Creating uuconf.h..."
  1681. $cat <<EOT >uuconf.h
  1682. /***************************************************************************
  1683. This work in its current form is Copyright 1986 Stan Barber
  1684. with the exception of resolve, gethostname and the original getpath which
  1685. as far as I know are in the Public Domain. This software may be distributed
  1686. freely as long as no profit is made from such distribution and this notice
  1687. is reproducted in whole.
  1688. The Configuration script and idea are borrowed from Larry Wall. Thanks
  1689. Larry!
  1690. ***************************************************************************
  1691. This software is provided on an "as is" basis with no guarantee of 
  1692. usefulness or correctness of operation for any purpose, intended or
  1693. otherwise. The author is in no way liable for this software's performance
  1694. or any damage it may cause to any data of any kind anywhere.
  1695. ***************************************************************************/
  1696.  
  1697. #include <stdio.h>
  1698. #include <ctype.h>
  1699. #include <pwd.h>
  1700. #include <signal.h>
  1701.  
  1702. #$usedbm UUDBM
  1703. #$sysexits SYSEXITS        /* sysexits.h is available */
  1704.  
  1705. #define NAMESIZ 32         /* system name size */
  1706. #define PATHSIZ 16*NAMESIZ     /* path length */
  1707. #define MAXDOMS    16        /* maximum number of domain elements */
  1708. #define TRUE    1
  1709. #define FALSE    0
  1710. /*
  1711.  * sysexits is a file of exit codes that are used in sendmail
  1712.  * and other programs ...
  1713.  */
  1714. #ifdef SYSEXITS
  1715. #include <sysexits.h>
  1716. #endif
  1717. /* if you don't have sysexits.h here are the useful parts */
  1718. #ifndef EX_OK
  1719.  
  1720. # define EX_OK        0    /* successful termination */
  1721.  
  1722.  
  1723. # define EX_USAGE    64    /* command line usage error */
  1724. # define EX_DATAERR    65    /* data format error */
  1725. # define EX_NOINPUT    66    /* cannot open input */
  1726. # define EX_NOHOST    68    /* host name unknown */
  1727. # define EX_UNAVAILABLE    69    /* service unavailable */
  1728. # define EX_SOFTWARE    70    /* internal software error */
  1729. # define EX_OSERR    71    /* system error (e.g., can't fork) */
  1730. # define EX_OSFILE    72    /* critical OS file missing */
  1731. # define EX_CANTCREAT    73    /* can't create (user) output file */
  1732. # define EX_IOERR    74    /* input/output error */
  1733. # define EX_TEMPFAIL    75      /* temp failure; user should retry */
  1734. #endif
  1735.  
  1736. typedef char bool;
  1737.  
  1738. #ifndef TIMEOUT
  1739. #define TIMEOUT ((unsigned) 180)
  1740. #endif TIMEOUT
  1741.  
  1742. #ifndef SENTINEL
  1743. #define SENTINEL "@@@"
  1744. #endif SENTINEL
  1745.  
  1746. /* Does this solve the problem of null for dbm users?
  1747.  * problem reported by pluto!warren */
  1748. #ifndef NULL
  1749. #define NULL    ((char *) 0)
  1750. #endif
  1751.  
  1752. /* uuconf.h
  1753.  * This file was produced by running the Configure script.
  1754.  * Feel free to modify any of this as the need arises.
  1755.  */
  1756.  
  1757. /* name of the site.  May be overridden by gethostname, uname, etc. */
  1758. #define SITENAME "$sitename"
  1759.  
  1760. /* login name of mail administrator, if any. */
  1761. #define MAILERDAEMON "$mailadmin"
  1762.  
  1763. /* uucp library */
  1764. #define LIB "$lib"
  1765.  
  1766. /* location of mailer */
  1767. #define MAILER "$mailer"
  1768.  
  1769. /* local mail delivery program */
  1770. #define LOCALMAIL "$localmail $localflags %s"
  1771.  
  1772. /* local mail directory */
  1773. #define MAILDIR    "$maildir"
  1774.  
  1775. /* root uid */
  1776. #define ROOTID $rootid
  1777.  
  1778. #ifndef UUDBM
  1779. #$sorted    SORTED        /* database is sorted */
  1780. #endif
  1781.  
  1782. #$resolve     RESOLVE        /* resolve addresses */
  1783. #$debug        DEBUG        /* compile in debugging */
  1784. #$log        LOG        /* log transactions */
  1785. #$noalias    NOALIAS        /* do aliasing? */
  1786. #$returnmail    RETURNMAIL    /* shall uumail return failed mail? */
  1787.  
  1788. #ifdef LOG
  1789. #define LOGFILE     "$logfile"
  1790. #endif
  1791.  
  1792. /* locations of database files */
  1793. #define DATABASE     "$database"
  1794.  
  1795. #ifndef NOALIAS
  1796. #define ALIASFILE     "$aliases"
  1797. #endif
  1798.  
  1799. #$strchr    index strchr    /* cultural */
  1800. #$strchr    rindex strrchr    /*  differences? */
  1801. #$novoid    void int    /* is void to be avoided? */
  1802. #$novfork    vfork fork    /* is vfork too virtual? */
  1803. #$eunice    EUNICE        /* no linking? */
  1804. #$eunice    VMS        /* not currently used, here just in case */
  1805. #$usendir    USENDIR        /* include ndir.c? */
  1806. #$libndir    LIBNDIR        /* include /usr/include/ndir.h? */
  1807. #$portable    PORTABLE    /* do we do extra lookups to start up? */
  1808. #$passnam    PASSNAMES    /* do names come from the passwd file? */
  1809.                 /*  (undef to take name from ~/.fullname) */
  1810. #$berknam    BERKNAMES    /* if so, are they Berkeley format? */
  1811.                 /* (that is, ":name,stuff:") */
  1812. #$usgnam    USGNAMES    /* or are they USG format? */
  1813.                 /* (that is, ":stuff-name(stuff):") */
  1814. #$whoami    WHOAMI        /* should we include whoami.h? */
  1815. #$fcntl        FCNTL        /* should we include fcntl.h? */
  1816. #$ioctl        IOCTL        /* are ioctl args all defined in one place? */
  1817. #$getpwent    GETPWENT    /* need we include slow getpwent? */
  1818. #$internet    INTERNET    /* does our mailer do INTERNET addressing? */
  1819. #$gethostname    GETHOSTNAME    /* do we have a gethostname function? */
  1820. #$douname    DOUNAME        /* do we have a uname function? */
  1821. #$phostname    PHOSTNAME "$hostcmd"    /* how to get host name with popen */
  1822.  
  1823. #$useknownhost    KNOWNHOST "$knownhost" /* a smarter host to punt to */
  1824.  
  1825. #ifdef _DEFINE
  1826. #define EXTERN 
  1827. #else
  1828. #define EXTERN extern
  1829. #endif
  1830. /*
  1831. The following structure is used in the aliasing and forwarding 
  1832. feature that is based on the method used in MH.
  1833. My thanks to the MH folks for making this stuff possible. */
  1834.  
  1835. struct  mailname {
  1836.     struct mailname *m_next;
  1837.     char            *m_name;
  1838.     int              m_pipe;
  1839. } ;
  1840.  
  1841. /* some people claim that some C-compilers cannot handle enums... */
  1842. /* for the handle variable */
  1843. #define ALL    1    /* UUCP and DOMAIN addresses */
  1844. #define JUSTUUCP 2    /* UUCP only */
  1845. #define NONE    3    /* all mail is LOCAL */
  1846.  
  1847. /* for form determinations */
  1848. #define ERROR 1
  1849. #define LOCAL 2
  1850. #define DOMAIN 3
  1851. #define UUCP 4
  1852. #define ROUTE 5
  1853.  
  1854.  
  1855. EXTERN int handle;
  1856. EXTERN int exitstat;    /* for resolve */
  1857. EXTERN int Debug;
  1858. EXTERN char *paths;
  1859. EXTERN char *ConfFile;
  1860. EXTERN char *AliasFile;
  1861. EXTERN char Myname[NAMESIZ];
  1862. EXTERN char * from;
  1863. EXTERN char lbuf[512]; /* for pipe to uux */
  1864. EXTERN char *logfile;
  1865. EXTERN char    OpMode;        /* operation mode, see below */
  1866. /* These don't do anything yet.... maybe next time they will do something */
  1867. #define MD_DELIVER    'm'        /* be a mail sender */
  1868. #define MD_ARPAFTP    'a'        /* old-style arpanet protocols */
  1869. #define MD_SMTP        's'        /* run SMTP on standard input */
  1870. #define MD_DAEMON    'd'        /* run as a daemon */
  1871. #define MD_VERIFY    'v'        /* verify: don't collect or deliver */
  1872. #define MD_TEST        't'        /* test mode: resolve addrs only */
  1873. #define MD_INITALIAS    'i'        /* initialize alias database */
  1874. #define MD_PRINT    'p'        /* print the queue */
  1875. #define MD_FREEZE    'z'        /* freeze the configuration file */
  1876. EOT
  1877.  
  1878. CONFIG=true
  1879.  
  1880.  
  1881.  
  1882. $rm -f libc.list .distlist kit*isdone
  1883.  
  1884. $echo " "
  1885. $echo "Doing variable substitutions on various files..."
  1886. $echo " "
  1887. set `$grep <MANIFEST '\.SH' | awk '{print $1}'`
  1888. for file in $*; do
  1889.     . $file
  1890. done
  1891.  
  1892. $echo " "
  1893. $echo 'Now you need to generate make dependencies by running "makedepend".'
  1894. $echo 'You might prefer to run it in background: "makedepend > makedepend.out &"'
  1895. $echo $n "Would you like me to run it for you? [n] $c" 
  1896. . myread
  1897. case "$ans" in
  1898. y*) makedepend;;
  1899. esac
  1900. $rm -f  uucp.local myread loc filexp bsd pdp11 v7 usg eunice
  1901. : end of Configure
  1902. !STUFFY!FUNK!
  1903. echo Extracting README
  1904. cat >README <<'!STUFFY!FUNK!'
  1905. This is an updated version of uumail (and uupath) that can 
  1906. access a pathalias-generated database to facilitate routine mail.
  1907.  
  1908. These program can cope with DBM and standard line-oriented forms of 
  1909. pathalias-generated databases.
  1910.  
  1911. This version of uumail can be used as uupath by linking uumail to
  1912. uupath. Also, this version can handle domain addresses (user@host.domain).
  1913. You can put as many addresses on a line as you like.
  1914.  
  1915. This version provides an alias and forwarding facility. For details on 
  1916. aliasing see the file "Alias.Design". The forward facility is similiar to
  1917. the one in sendmail. A user may forward his mail by adding a file called
  1918. ".forward" in his home directory. This file conatains the address(es) to which
  1919. mail is to be forwarded. These addresses are not reprocessed by the aliasing
  1920. subroutine, but may be in domain format (if RESOLVE is defined when you are
  1921. compiling).
  1922.  
  1923. There is also some experimental sections in this release that binary only
  1924. sites might like to experiment with. See the file "Binary.Only" for details on
  1925. this experiment.
  1926.  
  1927. There has been some confusion in the past on configuring uumail to work
  1928. with sendmail. See the file "Sendmail" for information on this.
  1929.  
  1930.  *    IF YOU ARE USING A DBM DATABASE, READ THIS!
  1931.  *    If the special sentinel value of @@@ is not present in the
  1932.  *    database, then getpath will assumed that the database is being
  1933.  *    rebuilt and will block for TIMEOUT (default = 180) seconds.  
  1934.  *    If, after 5 such blocks, the sentinel is not present,
  1935.  *    the error code EX_TEMPFAIL is returned.
  1936.  *    The same is true if the dbm files cannot be initialized.
  1937.  *    Please be sure to add the sentinal to the DBM database when
  1938.  *    it is created.
  1939.  *    To add the sentinel, use the "makedb" command.
  1940.  *    makedb -a dbrootname < @@@
  1941.  *    should append the sentinel to the database.
  1942.  *    makedb is part of the distribution of pathalias.
  1943.  
  1944. To configure uumail, type "sh Configure" and answer the questions
  1945. as best you can. You should be able to type "make" when it is 
  1946. done to build uumail.
  1947.  
  1948. Here are some manual alterations you may want to make by adding
  1949. these flags (in the form -Dflag) to the OPTIONS line in the Makefile.
  1950.  
  1951. NOGRADE should be used if your uux does not understand the -g flag.
  1952. NORETURN should be used if your uux does not understand the -a flag.
  1953.  
  1954. There are some other items that should be noted when configuring uumail.
  1955. In the makefile, set UUMAIL equal to the location of the uumail program
  1956. on your system FOLLOWING INSTALLATION! Set REALUUX equal to the location
  1957. of the uux program. This will be /usr/bin/uux on most systems. Binary
  1958. only site should check the "Binary.Only" file for more information on
  1959. the use of this symbol.
  1960.  
  1961. If you want to install this system, use "make install". If you want
  1962. to have it do all the work for incoming mail, type "make mailer". You
  1963. probably do not want to "make mailer" if you run sendmail.
  1964.  
  1965. A manual page for address, uumail and uupath are included.
  1966.  
  1967. IMPORTANT NOTE ABOUT THE PATHS DATABASE
  1968. The "palias" file supplied has routes to the known networks relative to
  1969. soma. To make this work for you, you can do one of two things:
  1970. 1. Get a recent distribution of pathalias and make your own database.
  1971. OR
  1972. 2. Edit the "palias" file to provide paths relative to your machine.
  1973. If you fail to do this, uumail will fail to find a usable path most
  1974. of the time.
  1975.  
  1976. RFC976 Compliance notes
  1977.  
  1978. Uumail is capable of satisfying Class 3 requirements as specified in
  1979. RFC976. It can also be compiled to satisfy Class 2 and Class 1 requirements
  1980. only. Here are the appropriate compile time flags for compliance with
  1981. with the three classes; these are only the flags necessary to make 
  1982. uumail perform in a particular class. Other flags may be needed to use
  1983. the dbm-type database and other options. It should be noted that each
  1984. higher numbered class is a superset of the lower numbered class,
  1985. so if you are a class 3 you will automatically comply with Classes 1
  1986. and 2. The following is excerpted from the RFC976 document.
  1987.  
  1988.  
  1989.    Class 1   old-style UUCP ! routing only.  We assume that the host
  1990.              understands local user names:
  1991.  
  1992.                   rmail user
  1993.  
  1994.              and bang paths
  1995.  
  1996.                   rmail host1!host2!user
  1997.  
  1998.              but we assume nothing more about the host.  If we have
  1999.              no information about a host, we can treat it as class 1
  2000.              with no problems, since we make no assumptions about
  2001.              how it will handle hybrid addresses.
  2002.  
  2003. COMPILE FLAGS NEED FOR THIS CLASS: none
  2004.  
  2005.  
  2006.  
  2007.    Class 2   Old style UUCP ! routing, and 4.2BSD style domain
  2008.              parsing.  We assume the capabilities of class 1, plus
  2009.              the ability to understand
  2010.  
  2011.                   rmail user@domain
  2012.  
  2013.              if the "domain" is one outside the UUCP zone which
  2014.              the host knows about.  Class 2 hosts do not necessarily
  2015.              understand domain!user or have routers.  Hosts in non-
  2016.  
  2017.              UUCP RFC-920 domains are considered class 2, even though
  2018.              they may not understand host!user.
  2019.  
  2020. COMPILE FLAGS NEED FOR THIS CLASS: RESOLVE
  2021.  
  2022.    Class 3   All class 1 and 2 features are present.  In addition,
  2023.              class 3 hosts must be able to route UUCP mail for hosts
  2024.              that are not immediately adjacent and also understand
  2025.              the syntax
  2026.  
  2027.                   rmail domain!user
  2028.  
  2029.              as described above.  All gateways into UUCP must be
  2030.              class 3.
  2031.  
  2032. COMPILE FLAGS NEED FOR THIS CLASS: RESOLVE
  2033.  
  2034. Please forward comments and bug fixes to me at sob@rice.edu or 
  2035. ihnp4!shell!soma!sob or cuae2!soma!sob or seismo!soma!sob.
  2036.  
  2037. Stan Barber
  2038. Baylor College of Medicine
  2039. Houston, Texas
  2040.  
  2041. P.S. My thanks to all those who reported bugs from the previous release.
  2042. Please continue to send them in, and I will try to keep fixing them.
  2043.  
  2044.  
  2045. ***************************************************************************
  2046. This work in its current form is Copyright 1986 Stan Barber
  2047. with the exception of resolve, gethostname, and the original getpath which
  2048. as far as I know are in the Public Domain. This software may be distributed
  2049. freely as long as no profit is made from such distribution and this notice
  2050. is reproducted in whole.
  2051. ***************************************************************************
  2052. This software is provided on an "as is" basis with no guarantee of 
  2053. usefulness or correctness of operation for any purpose, intended or
  2054. otherwise. The author is in no way liable for this software's performance
  2055. or any damage it may cause to any data of any kind anywhere.
  2056. ***************************************************************************
  2057. My thanks to Larry Wall for allowing the use of his Configure idea in other
  2058. systems. My thanks to the MH folks for the aliasing idea.
  2059.  
  2060. !STUFFY!FUNK!
  2061. echo Extracting manifake
  2062. cat >manifake <<'!STUFFY!FUNK!'
  2063. #!/bin/sh
  2064. # $Header: manifake,v 4.3 85/05/01 11:42:41 lwall Exp $
  2065. #
  2066. # $Log:    manifake,v $
  2067. # Revision 4.3  85/05/01  11:42:41  lwall
  2068. # Baseline for release with 4.3bsd.
  2069.  
  2070. : make MANIFEST and MANIFEST.new say the same thing
  2071. if test ! -f MANIFEST.new; then
  2072.     if test -f MANIFEST; then
  2073.     sed <MANIFEST >MANIFEST.new \
  2074.         -e '1,/---/d' \
  2075.         -e 's/\([     ][     ]*\)[0-9]*  */\1/'
  2076.     else
  2077.     echo "Make a MANIFEST.new file, with names and descriptions."
  2078.     fi
  2079. fi
  2080. !STUFFY!FUNK!
  2081. echo ""
  2082. echo "End of kit 1 (of 4)"
  2083. cat /dev/null >kit1isdone
  2084. config=true
  2085. for iskit in 1               2               3               4               ; do
  2086.     if test -f kit${iskit}isdone; then
  2087.     echo "You have run kit ${iskit}."
  2088.     else
  2089.     echo "You still need to run kit ${iskit}."
  2090.     config=false
  2091.     fi
  2092. done
  2093. case $config in
  2094.     true)
  2095.     echo "You have run all your kits.  Please read README and then type Configure."
  2096.     chmod 755 Configure
  2097.     ;;
  2098. esac
  2099. : I do not append .signature, but someone might mail this.
  2100. exit
  2101.  
  2102.