summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhalex <halex@openbsd.org>2013-12-17 09:19:45 +0000
committerhalex <halex@openbsd.org>2013-12-17 09:19:45 +0000
commitcd75de38ac52979febef8aab9cd5406c243baee8 (patch)
tree2cf8124293d33993d094949d54a4a6d8c0808100
parentdefine FUSE_{MAJOR,MINOR}_VERSION which many fuse helpers assume is defined. (diff)
downloadwireguard-openbsd-cd75de38ac52979febef8aab9cd5406c243baee8.tar.xz
wireguard-openbsd-cd75de38ac52979febef8aab9cd5406c243baee8.zip
Run spamd-setup from within /etc/rc.d/spamd, and take $spamd_black
into consideration. Diff from Maurice Janssen, thanks! ok rpe@ giovanni@
-rw-r--r--etc/rc6
-rw-r--r--etc/rc.d/spamd10
2 files changed, 10 insertions, 6 deletions
diff --git a/etc/rc b/etc/rc
index e678ad0be71..348c8d64dd9 100644
--- a/etc/rc
+++ b/etc/rc
@@ -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
diff --git a/etc/rc.d/spamd b/etc/rc.d/spamd
index abc13096a07..caee8043583 100644
--- a/etc/rc.d/spamd
+++ b/etc/rc.d/spamd
@@ -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