sendmail (124616) | sendmail (124622) |
---|---|
1#!/bin/sh 2# 3# $NetBSD: sendmail,v 1.14 2002/02/12 01:26:36 lukem Exp $ | 1#!/bin/sh 2# 3# $NetBSD: sendmail,v 1.14 2002/02/12 01:26:36 lukem Exp $ |
4# $FreeBSD: head/etc/rc.d/sendmail 124616 2004-01-17 10:16:38Z mtm $ | 4# $FreeBSD: head/etc/rc.d/sendmail 124622 2004-01-17 10:59:43Z mtm $ |
5# 6 7# PROVIDE: mail 8# REQUIRE: LOGIN 9# KEYWORD: FreeBSD 10# we make mail start late, so that things like .forward's are not 11# processed until the system is fully operational 12 13# XXX - Get together with sendmail mantainer to figure out how to 14# better handle SENDMAIL_ENABLE and 3rd party MTAs. 15# 16. /etc/rc.subr 17 18name="sendmail" 19rcvar=`set_rcvar` 20required_files="/etc/mail/${name}.cf" | 5# 6 7# PROVIDE: mail 8# REQUIRE: LOGIN 9# KEYWORD: FreeBSD 10# we make mail start late, so that things like .forward's are not 11# processed until the system is fully operational 12 13# XXX - Get together with sendmail mantainer to figure out how to 14# better handle SENDMAIL_ENABLE and 3rd party MTAs. 15# 16. /etc/rc.subr 17 18name="sendmail" 19rcvar=`set_rcvar` 20required_files="/etc/mail/${name}.cf" |
21command=${sendmail_program:-/usr/sbin/sendmail} 22pidfile=${sendmail_pidfile:-/var/run/sendmail.pid} |
|
21 | 23 |
22case ${OSTYPE} in 23FreeBSD) 24 command=${sendmail_program:-/usr/sbin/sendmail} 25 pidfile=${sendmail_pidfile:-/var/run/sendmail.pid} | 24load_rc_config $name |
26 | 25 |
27 load_rc_config $name 28 29 case ${sendmail_enable} in 30 [Nn][Oo][Nn][Ee]) 31 sendmail_enable="NO" 32 sendmail_submit_enable="NO" 33 sendmail_outbound_enable="NO" 34 sendmail_msp_queue_enable="NO" 35 ;; 36 esac | 26case ${sendmail_enable} in 27[Nn][Oo][Nn][Ee]) 28 sendmail_enable="NO" 29 sendmail_submit_enable="NO" 30 sendmail_outbound_enable="NO" 31 sendmail_msp_queue_enable="NO" |
37 ;; | 32 ;; |
38NetBSD) 39 command="/usr/sbin/${name}" 40 pidfile="/var/run/${name}.pid" 41 start_precmd="sendmail_precmd" 42 43 load_rc_config $name 44 ;; | |
45esac 46 47sendmail_precmd() 48{ 49 # Die if there's pre-8.10 custom configuration file. This check is 50 # mandatory for smooth upgrade. See NetBSD PR 10100 for details. 51 # 52 if checkyesno ${rcvar} && [ -f "/etc/${name}.cf" ]; then --- 25 unchanged lines hidden (view full) --- 78 "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating" 79 /usr/sbin/makemap hash /etc/mail/$f < /etc/mail/$f 80 fi 81 done 82} 83 84run_rc_command "$1" 85 | 33esac 34 35sendmail_precmd() 36{ 37 # Die if there's pre-8.10 custom configuration file. This check is 38 # mandatory for smooth upgrade. See NetBSD PR 10100 for details. 39 # 40 if checkyesno ${rcvar} && [ -f "/etc/${name}.cf" ]; then --- 25 unchanged lines hidden (view full) --- 66 "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating" 67 /usr/sbin/makemap hash /etc/mail/$f < /etc/mail/$f 68 fi 69 done 70} 71 72run_rc_command "$1" 73 |
86case ${OSTYPE} in 87FreeBSD) 88 required_files= | 74required_files= |
89 | 75 |
90 if ! checkyesno sendmail_enable; then 91 name="sendmail_submit" 92 rcvar=`set_rcvar` 93 start_cmd="${command} ${sendmail_submit_flags}" 94 run_rc_command "$1" 95 fi | 76if ! checkyesno sendmail_enable; then 77 name="sendmail_submit" 78 rcvar=`set_rcvar` 79 start_cmd="${command} ${sendmail_submit_flags}" 80 run_rc_command "$1" 81fi |
96 | 82 |
97 if ! checkyesno sendmail_outbound_enable; then 98 name="sendmail_outbound" 99 rcvar=`set_rcvar` 100 start_cmd="${command} ${sendmail_outbound_flags}" 101 run_rc_command "$1" 102 fi 103 104 name="sendmail_clientmqueue" 105 rcvar="sendmail_msp_queue_enable" 106 start_cmd="${command} ${sendmail_msp_queue_flags}" 107 pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}" 108 required_files="/etc/mail/submit.cf" | 83if ! checkyesno sendmail_outbound_enable; then 84 name="sendmail_outbound" 85 rcvar=`set_rcvar` 86 start_cmd="${command} ${sendmail_outbound_flags}" |
109 run_rc_command "$1" | 87 run_rc_command "$1" |
110 ;; 111esac | 88fi 89 90name="sendmail_clientmqueue" 91rcvar="sendmail_msp_queue_enable" 92start_cmd="${command} ${sendmail_msp_queue_flags}" 93pidfile="${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}" 94required_files="/etc/mail/submit.cf" 95run_rc_command "$1" |