Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/etc/rc.d pull up rev 1.11 (approved by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/e9f734adf064
branches:  netbsd-1-5
changeset: 489617:e9f734adf064
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Oct 02 01:06:10 2000 +0000

description:
pull up rev 1.11 (approved by thorpej):
        - always use $rcvar to determine the name of the var to checkyesno
        - fix force*

diffstat:

 etc/rc.d/sendmail |  23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r 89d5ce7653b0 -r e9f734adf064 etc/rc.d/sendmail
--- a/etc/rc.d/sendmail Mon Oct 02 01:02:49 2000 +0000
+++ b/etc/rc.d/sendmail Mon Oct 02 01:06:10 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: sendmail,v 1.9 2000/06/13 15:53:03 itojun Exp $
+# $NetBSD: sendmail,v 1.9.2.1 2000/10/02 01:06:10 lukem Exp $
 #
 
 # PROVIDE: mail
@@ -13,6 +13,7 @@
 . /etc/rc.subr
 
 name="sendmail"
+rcvar=$name
 command="/usr/sbin/${name}"
 pidfile="/var/run/${name}.pid"
 required_files="/etc/mail/${name}.cf"
@@ -25,10 +26,28 @@
        #
        if checkyesno sendmail && [ -f "/etc/${name}.cf" ]; then
                if ! cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf"; then
-                       warn "${name} was not started, you have multiple sendmail.cf."
+                       warn \
+    "${name} was not started; you have multiple copies of sendmail.cf."
                        return 1
                fi
        fi
+
+       # check modifications on /etc/mail/aliases
+       if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then
+               echo \
+    "${name}: /etc/mail/aliases newer than /etc/mail/aliases.db, regenerating"
+               /usr/bin/newaliases
+       fi
+
+       # check couple of common db files, too
+       for f in genericstable virtusertable domaintable mailertable; do
+               if [ -r "/etc/mail/$f" -a "/etc/mail/$f" -nt "/etc/mail/$f.db" ];
+               then
+                       echo \
+    "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating"
+                       /usr/sbin/makemap hash /etc/mail/$f < /etc/mail/$f
+               fi
+       done
 }
 
 load_rc_config $name



Home | Main Index | Thread Index | Old Index