]> andersk Git - moira.git/commitdiff
gen script for the aliases service (replacing expn)
authorzacheiss <zacheiss>
Mon, 29 May 2000 22:17:58 +0000 (22:17 +0000)
committerzacheiss <zacheiss>
Mon, 29 May 2000 22:17:58 +0000 (22:17 +0000)
gen/aliases.sh [new file with mode: 0644]

diff --git a/gen/aliases.sh b/gen/aliases.sh
new file mode 100644 (file)
index 0000000..ee77c56
--- /dev/null
@@ -0,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$
This page took 0.041447 seconds and 5 git commands to generate.