summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2007-06-12 17:33:23 +0000
committergshapiro <gshapiro@FreeBSD.org>2007-06-12 17:33:23 +0000
commit8487a6b5828d7ea55a1934ab88215bde33f57812 (patch)
treea87980518ed2c57ddd4262104fc6b9377e4426ed /etc/rc.d
parent48df7c2e40b7a2c2788a973ba68cb29be59f88fa (diff)
downloadFreeBSD-src-8487a6b5828d7ea55a1934ab88215bde33f57812.zip
FreeBSD-src-8487a6b5828d7ea55a1934ab88215bde33f57812.tar.gz
Add a new rc.conf variable, sendmail_rebuild_aliases, which tells
/etc/rc.d/sendmail whether or not to run newaliases if the database is missing or the aliases text file is newer than aliases.db. In my opinion, the aliases file should never be automatically rebuilt. The current text form could represent a work in progress. Therefore, in FreeBSD 7.0, this new option will default to "NO". When this rc.d change is MFC'ed, it will need to remain "YES" to maintain backward compatibility. PR: conf/86252 Approved by: re (kensmith) MFC after: 3 days
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-xetc/rc.d/sendmail18
1 files changed, 10 insertions, 8 deletions
diff --git a/etc/rc.d/sendmail b/etc/rc.d/sendmail
index ab76073..0e96f2c 100755
--- a/etc/rc.d/sendmail
+++ b/etc/rc.d/sendmail
@@ -58,16 +58,18 @@ sendmail_precmd()
fi
# check modifications on /etc/mail/aliases
- if [ -f "/etc/mail/aliases.db" ]; then
- if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then
+ if checkyesno sendmail_rebuild_aliases; 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
- else
- echo \
- "${name}: /etc/mail/aliases.db not present, generating"
- /usr/bin/newaliases
fi
}
OpenPOWER on IntegriCloud