diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-03-23 10:10:55 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-03-23 10:10:55 +0000 |
commit | 39886a666c196552c67bed369fd1682b59957c20 (patch) | |
tree | c23954bb9900447307e2ee375e7c88dcd2cf734d /etc | |
parent | 4755aadd03763ed7977f9b2aab99d520464362fa (diff) |
Don't check for spamd_black twice in rc_pre and rc_start; just do everything
in rc_pre.
prodded by and ok jmc@, ok halex@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/spamd | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/etc/rc.d/spamd b/etc/rc.d/spamd index 87003ce88fb..873fe7b7af5 100644 --- a/etc/rc.d/spamd +++ b/etc/rc.d/spamd @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: spamd,v 1.7 2015/07/15 13:50:54 ajacoutot Exp $ +# $OpenBSD: spamd,v 1.8 2017/03/23 10:10:54 ajacoutot Exp $ daemon="/usr/libexec/spamd" @@ -10,17 +10,15 @@ pexp="spamd: \[priv\].*" rc_reload=NO rc_pre() { - [ X"${spamd_black}" != X"NO" ] && \ + if [ X"${spamd_black}" != X"NO" ]; then daemon_flags="-b ${daemon_flags}" - return 0 + spamd_setup_flags="-b" + fi } rc_start() { ${rcexec} "${daemon} ${daemon_flags}" || return 1 - spamd_setup_flags="-D" - [ X"${spamd_black}" != X"NO" ] && \ - spamd_setup_flags="-b ${spamd_setup_flags}" - /usr/libexec/spamd-setup ${spamd_setup_flags} + /usr/libexec/spamd-setup -D ${spamd_setup_flags} } rc_cmd $1 |