Browse Source

Run spamd-setup from within /etc/rc.d/spamd, and take $spamd_black

into consideration.
Diff from Maurice Janssen, thanks!
ok rpe@ giovanni@
OPENBSD_5_5
halex 10 years ago
parent
commit
81d51a594f
2 changed files with 10 additions and 6 deletions
  1. +1
    -5
      src/etc/rc
  2. +9
    -1
      src/etc/rc.d/spamd

+ 1
- 5
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.408 2013/12/15 17:40:45 tedu Exp $
# $OpenBSD: rc,v 1.409 2013/12/17 09:19:45 halex Exp $
# System startup script run by init on autoboot
# or after single-user.
@ -499,10 +499,6 @@ start_daemon rbootd mopd spamd spamlogd kdc kadmind kpasswdd
start_daemon ipropd_master ipropd_slave sndiod
echo '.'
if [ X"${spamd_flags}" != X"NO" ]; then
/usr/libexec/spamd-setup -D
fi
# If rc.firstime exists, run it just once, and make sure it is deleted
if [ -f /etc/rc.firsttime ]; then
mv /etc/rc.firsttime /etc/rc.firsttime.run


+ 9
- 1
src/etc/rc.d/spamd View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: spamd,v 1.3 2013/09/13 14:50:56 okan Exp $
# $OpenBSD: spamd,v 1.4 2013/12/17 09:19:45 halex Exp $
daemon="/usr/libexec/spamd"
@ -15,4 +15,12 @@ rc_pre() {
return 0
}
rc_start() {
${rcexec} "${daemon} ${daemon_flags} ${_bg}"
spamd_setup_flags="-D"
[ X"${spamd_black}" != X"NO" ] && \
spamd_setup_flags="-b ${spamd_setup_flags}"
rc_do rc_wait start && /usr/libexec/spamd-setup ${spamd_setup_flags}
}
rc_cmd $1

Loading…
Cancel
Save