[1551] in Moira

home help back first fref pref prev next nref lref last post

aliases dcm and aliases.sh

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Fri May 26 18:02:12 2000

Message-Id: <200005262202.SAA16368@mary-kay-commandos.mit.edu>
To: moira-admin@MIT.EDU, moiradev@MIT.EDU
Date: Fri, 26 May 2000 18:02:09 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

	mark requested an ALIASES dcm for putting a copy of the aliases
file on nic, so I put one in place.  It uses nmailhub.gen and this
script, which is a modified mailhub.sh.

Garry
  
Index: aliases.sh
===================================================================
RCS file: aliases.sh
diff -N aliases.sh
*** /dev/null	Fri May 26 16:09:38 2000
--- aliases.sh	Fri May 26 17:30:18 2000
***************
*** 0 ****
--- 1,27 ----
+ #!/bin/sh
+ PATH=/bin:/usr/ucb:/usr/bin
+ root=/usr/local/sendmail
+ 
+ MR_MKCRED=47836474
+ 
+ cat $root/etc/aliases.legacy > $root/etc/aliases.tmp
+ cat $root/etc/aliases.new >> $root/etc/aliases.tmp
+ cat $root/etc/aliases.local >> $root/etc/aliases.tmp
+ mv $root/etc/aliases.tmp $root/etc/aliases.new
+ 
+ cp /dev/null $root/etc/aliases.new.db
+ 
+ $root/sbin/sendmail -bi -oA$root/etc/aliases.new -C$root/etc/sendmail.cf
+ if [ $? != 0 ]; then
+     exit $MR_MKCRED
+ fi
+ 
+ mv $root/etc/aliases $root/etc/aliases.old
+ mv $root/etc/aliases.db $root/etc/aliases.old.db
+ mv $root/etc/aliases.new $root/etc/aliases
+ mv $root/etc/aliases.new.db $root/etc/aliases.db
+ 
+ rm -f $0
+ exit 0
+ 
+ # $Header$

home help back first fref pref prev next nref lref last post