Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d Patch from Hubert. aliases never get rebuilt if ali...



details:   https://anonhg.NetBSD.org/src/rev/6ee4368d33f4
branches:  trunk
changeset: 500757:6ee4368d33f4
user:      jmc <jmc%NetBSD.org@localhost>
date:      Mon Dec 18 07:56:41 2000 +0000

description:
Patch from Hubert. aliases never get rebuilt if aliases.db is never originally generated.

diffstat:

 etc/rc.d/sendmail |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 57ad4aa05714 -r 6ee4368d33f4 etc/rc.d/sendmail
--- a/etc/rc.d/sendmail Mon Dec 18 06:39:38 2000 +0000
+++ b/etc/rc.d/sendmail Mon Dec 18 07:56:41 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: sendmail,v 1.12 2000/10/09 06:11:38 nisimura Exp $
+# $NetBSD: sendmail,v 1.13 2000/12/18 07:56:41 jmc Exp $
 #
 
 # PROVIDE: mail
@@ -33,10 +33,16 @@
        fi
 
        # check modifications on /etc/mail/aliases
-       if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then
+       if [ -f "/etc/mail/aliases.db" ]; then
+               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
+       else
                echo \
-    "${name}: /etc/mail/aliases newer than /etc/mail/aliases.db, regenerating"
-               /usr/bin/newaliases
+           "${name}: /etc/mail/aliases.db not present, generating"
+                       /usr/bin/newaliases
        fi
 
        # check couple of common db files, too



Home | Main Index | Thread Index | Old Index