[comp.mail.sendmail] UK-2.1 sendmail patch 1

jimc@quintus.com (Jim Crammond) (06/07/91)

I've decided to make two small changes to UK-2.1 to aid users whose
sendmail.cf and aliases live in /etc instead of /usr/lib.

Change 1: -d option to Install.sh to specify destination directory.
Change 2: add example to Examples/localise.sh of aliases being in /etc

Here is the patch. You should run it in the "top level" directory
of the UK-2.1 area. (Patch will patch Install.sh and then may prompt you
for the filename before patching Examples/localise.sh).

*** Install.sh.old	Tue Jan 17 02:39:18 1989
--- Install.sh	Thu Jun  6 09:25:59 1991
***************
*** 1,9 ****
--- 1,12 ----
  #!/bin/sh
  # install a new sendmail configuration file on a host on the network
  # produce a freeze file and start a new daemon
+ # usage: Install.sh [-f] [-n] [-s] [-d dir] host [cf_file]
+ #
  # if -f is specified, a freeze file is not made.
  # if -n is specified, only the daemon is started.
  # if -s is specified, the remote host is assumed to have SysV ps.
+ # if -d dir is specified, the cf file is rcp'd to <dir>/sendmail.cf
  
  
  dofreeze=true
***************
*** 10,15 ****
--- 13,19 ----
  docopy=true
  bsd=true
  verbose=+x
+ dir=/usr/lib
  
  while [ $# -ge 1 ]
  do
***************
*** 22,27 ****
--- 26,34 ----
  		;;
  	-v)	verbose=-x
  		;;
+ 	-d)	dir=$2
+ 		shift
+ 		;;
  	*)	host=$1
  		if [ $# -eq 2 ]
  		then
***************
*** 49,55 ****
  #	copy configuration file.  If successful, freeze it; otherwise
  #	the host is probably down - remove the cf file and quit
  #
! 	if (set $verbose; rcp $file $host:/usr/lib/sendmail.cf)
  	then
  		if $dofreeze
  		then
--- 56,62 ----
  #	copy configuration file.  If successful, freeze it; otherwise
  #	the host is probably down - remove the cf file and quit
  #
! 	if (set $verbose; rcp $file $host:$dir/sendmail.cf)
  	then
  		if $dofreeze
  		then
*** Examples/localise.sh.old	Wed Jan 18 06:10:30 1989
--- Examples/localise.sh	Thu Jun  6 09:29:55 1991
***************
*** 1,5 ****
--- 1,11 ----
  #!/bin/sh
  chmod u+w base.m4
+ # if the aliases file lives in /etc rather than /usr/lib
+ ed base.m4 <<'EOF'
+ /^OA/s/usr.lib/etc/p
+ w
+ q
+ EOF
  # if we wanted to change an existing option we could
  ed base.m4 <<'EOF'
  /^OX12$/s/12/80/p