postfix revision 1.7
1#!/bin/sh 2# 3# $NetBSD: postfix,v 1.7 2003/01/31 06:47:16 lukem Exp $ 4# 5 6# PROVIDE: mail 7# REQUIRE: LOGIN 8# we make mail start late, so that things like .forward's are not 9# processed until the system is fully operational 10 11. /etc/rc.subr 12 13name="postfix" 14rcvar=$name 15required_files="/etc/${name}/main.cf" 16start_precmd="postfix_precmd" 17start_cmd="${name} "'${rc_arg}' 18stop_cmd=$start_cmd 19reload_cmd=$start_cmd 20extra_commands="reload" 21spooletcdir="/var/spool/${name}/etc" 22required_dirs=$spooletcdir 23 24postfix_precmd() 25{ 26 # As this is called after the is_running and required_dir checks 27 # are made in run_rc_command(), we can safely assume ${spooletcdir} 28 # exists and postfix isn't running at this point (unless forcestart 29 # is used). 30 # 31 32 for f in localtime resolv.conf services; do 33 if [ -f /etc/$f ]; then 34 cmp -s /etc/$f ${spooletcdir}/$f || \ 35 cp -p /etc/$f ${spooletcdir}/$f 36 fi 37 done 38} 39 40load_rc_config $name 41run_rc_command "$1" 42