Subject: regenerating genericstable etc.
To: None <tech-net@netbsd.org>
From: None <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-net
Date: 01/31/2001 18:59:24
right now, /etc/rc.d/sendmail contains code to regenerate aliases,
genericstable etc. on startup, if needed. I wonder if we shouldn't offer
regenerating them without restarting sendmail?
I thought of moving the commands into /etc/mail/Makefile, and call that
from /etc/rc.d/sendmail then. See the attached /etc/mail/Makefile below.
Comments?
- Hubert
update:
@# check modifications on /etc/mail/aliases
@if [ "/etc/mail/aliases" -nt "/etc/mail/aliases.db" ]; then \
echo \
"/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 \
"/etc/mail/$$f newer than /etc/mail/$$f.db, regenerating" ; \
/usr/sbin/makemap hash /etc/mail/$$f < /etc/mail/$$f ; \
fi ; \
done
--
*** Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
*** FB Informatik, FH Regensburg, Pruefeningerstr. 58, 93048 Regensburg