summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/Makefile6
-rw-r--r--etc/rc21
-rw-r--r--etc/rc.conf7
-rw-r--r--etc/rc.d/amd19
-rw-r--r--etc/rc.d/bootparamd4
-rw-r--r--etc/rc.d/ldattach4
-rw-r--r--etc/rc.d/mopd4
-rw-r--r--etc/rc.d/rarpd4
-rw-r--r--etc/rc.d/spamd3
-rw-r--r--etc/rc.d/spamlogd15
-rw-r--r--etc/rc.d/ypbind5
-rw-r--r--etc/rc.d/yppasswdd3
-rw-r--r--etc/rc.d/ypserv5
13 files changed, 63 insertions, 37 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 5fceefa551b..4a635d863c0 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.305 2011/07/08 00:54:04 ajacoutot Exp $
+# $OpenBSD: Makefile,v 1.306 2011/07/08 02:15:34 robert Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain
@@ -31,13 +31,13 @@ BIN1+= wsconsctl.conf
BIN2= motd
# -r-xr-xr-x
-RCDAEMONS= apmd aucat bgpd bootparamd btd cron dhcpd dhcrelay dvmrpd ftpd \
+RCDAEMONS= amd apmd aucat bgpd bootparamd btd cron dhcpd dhcrelay dvmrpd ftpd \
ftpproxy hostapd hotplugd httpd identd ifstated iked inetd isakmpd \
ldapd ldattach ldpd lpd mopd mrouted named nsd ntpd portmap pflogd \
rarpd rbootd relayd ripd route6d rtadvd rtsold rwhod sasyncd \
sendmail sensorsd smtpd snmpd spamd sshd syslogd watchdogd wsmoused \
xdm ypbind ypldap yppasswdd ypserv kdc kadmind kpasswdd nfsd mountd \
- lockd statd
+ lockd statd spamlogd
MISETS= base${OSrev}.tgz comp${OSrev}.tgz \
man${OSrev}.tgz game${OSrev}.tgz etc${OSrev}.tgz
diff --git a/etc/rc b/etc/rc
index 02af126da4e..57be2728c01 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.376 2011/07/08 02:02:02 deraadt Exp $
+# $OpenBSD: rc,v 1.377 2011/07/08 02:15:34 robert Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -446,12 +446,7 @@ start_daemon portmap
if [ X"`domainname`" != X"" ]; then
start_daemon ypserv ypldap ypbind yppasswdd
fi
-start_daemon mountd nfsd lockd statd
-
-if [ X"${amd}" = X"YES" -a -e ${amd_master} ]; then
- echo -n ' amd'
- (cd /etc/amd; amd `cat ${amd_master}`)
-fi
+start_daemon mountd nfsd lockd statd amd
# run rdate before ntpd
if [ X"${rdate_flags}" != X"NO" ]; then
@@ -553,18 +548,14 @@ if ifconfig lo0 inet6 >/dev/null 2>&1; then
fi
start_daemon hostapd rwhod lpd ldapd sendmail smtpd httpd ftpd
-start_daemon ftpproxy identd inetd rarpd bootparamd rbootd mopd spamd
+start_daemon ftpproxy identd inetd rarpd bootparamd rbootd mopd
+start_daemon spamd spamlogd
+
+echo '.'
[ X"${spamd_flags}" != X"NO" ] && \
/usr/libexec/spamd-setup -D
-if [ X"${spamd_flags}" != X"NO" -a X"${spamd_black}" = X"NO" ]; then
- echo -n ' spamlogd'
- /usr/libexec/spamlogd ${spamlogd_flags}
-fi
-
-echo '.'
-
if [ X"${kdc_flags}" != X"NO" ]; then
echo -n 'starting KerberosV daemons:'
start_daemon kdc kadmind kpasswdd
diff --git a/etc/rc.conf b/etc/rc.conf
index 58a202fb80d..eeb41397c19 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: rc.conf,v 1.149 2011/07/08 00:54:04 ajacoutot Exp $
+# $OpenBSD: rc.conf,v 1.150 2011/07/08 02:15:34 robert Exp $
# set these to "NO" to turn them off. otherwise, they're used as flags
ldpd_flags=NO # for normal use: ""
@@ -52,7 +52,8 @@ portmap_flags=NO # for normal use: ""
kdc_flags=NO # for normal use: "" see 'info heimdal' for help
kadmind_flags=NO # for normal use: ""
kpasswdd_flags=NO # for normal use: ""
-btd_flags=NO
+btd_flags=NO # for normal use: ""
+amd_flags=NO
# use -u to disable chroot, see httpd(8)
httpd_flags=NO # for normal use: "" (or "-DSSL" after reading ssl(8))
@@ -76,7 +77,6 @@ xdm_flags=NO # for normal use: ""
wsmoused_flags=NO # for ps/2 or usb mice: "", serial: "-p /dev/cua00"
# set the following to "YES" to turn them on
-amd=NO
pf=YES # Packet filter / NAT
ipsec=NO # IPsec
bt=NO # Bluetooth
@@ -134,3 +134,4 @@ unset statd_flags
: ${mountd_flags=$([ X"${nfs_server-NO}" = XYES ] || echo NO)}
: ${lockd_flags=$([ X"${lockd-NO}" = XYES ] || echo NO)}
: ${statd_flags=$([ X"${lockd-NO}" = XYES ] || echo NO)}
+: ${amd_flags=$([ X"${amd-NO}" = XYES ] || echo NO)}
diff --git a/etc/rc.d/amd b/etc/rc.d/amd
new file mode 100644
index 00000000000..5e474c9541f
--- /dev/null
+++ b/etc/rc.d/amd
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $OpenBSD: amd,v 1.1 2011/07/08 02:15:34 robert Exp $
+
+daemon="/usr/sbin/amd"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+rc_restart=NO
+rc_stop=NO
+
+rc_pre() {
+ [ -e ${amd_master} ]
+ daemon_flags=$(cat ${amd_master})
+ return 0
+}
+
+rc_cmd $1
diff --git a/etc/rc.d/bootparamd b/etc/rc.d/bootparamd
index e3f45a505be..6b527184801 100644
--- a/etc/rc.d/bootparamd
+++ b/etc/rc.d/bootparamd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: bootparamd,v 1.1 2011/07/06 18:55:36 robert Exp $
+# $OpenBSD: bootparamd,v 1.2 2011/07/08 02:15:34 robert Exp $
daemon="/usr/sbin/rpc.bootparamd"
@@ -9,7 +9,7 @@ daemon="/usr/sbin/rpc.bootparamd"
rc_reload=NO
rc_pre() {
- [ -s /etc/bootparams ] || return 1
+ [ -s /etc/bootparams ]
}
rc_cmd $1
diff --git a/etc/rc.d/ldattach b/etc/rc.d/ldattach
index 39d520aeb90..d12f3ff6f9c 100644
--- a/etc/rc.d/ldattach
+++ b/etc/rc.d/ldattach
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: ldattach,v 1.1 2011/07/06 18:55:36 robert Exp $
+# $OpenBSD: ldattach,v 1.2 2011/07/08 02:15:34 robert Exp $
daemon="/sbin/ldattach"
@@ -9,7 +9,7 @@ daemon="/sbin/ldattach"
rc_reload=NO
rc_pre() {
- [ -n "${ldattach_flags}" ] || return 1
+ [ -n "${ldattach_flags}" ]
}
rc_cmd $1
diff --git a/etc/rc.d/mopd b/etc/rc.d/mopd
index cf46ddae78b..2f806ebfe8b 100644
--- a/etc/rc.d/mopd
+++ b/etc/rc.d/mopd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: mopd,v 1.1 2011/07/06 18:55:36 robert Exp $
+# $OpenBSD: mopd,v 1.2 2011/07/08 02:15:34 robert Exp $
daemon="/usr/sbin/mopd"
@@ -9,7 +9,7 @@ daemon="/usr/sbin/mopd"
rc_reload=NO
rc_pre() {
- [ -d /tftpboot/mop ] || return 1
+ [ -d /tftpboot/mop ]
}
rc_cmd $1
diff --git a/etc/rc.d/rarpd b/etc/rc.d/rarpd
index 82a8ac77eaf..e63053b211e 100644
--- a/etc/rc.d/rarpd
+++ b/etc/rc.d/rarpd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: rarpd,v 1.1 2011/07/06 18:55:36 robert Exp $
+# $OpenBSD: rarpd,v 1.2 2011/07/08 02:15:34 robert Exp $
daemon="/usr/sbin/rarpd"
@@ -9,7 +9,7 @@ daemon="/usr/sbin/rarpd"
rc_reload=NO
rc_pre() {
- [ -s /etc/ethers ] || return 1
+ [ -s /etc/ethers ]
}
rc_cmd $1
diff --git a/etc/rc.d/spamd b/etc/rc.d/spamd
index fbf67898ac4..54bd001e162 100644
--- a/etc/rc.d/spamd
+++ b/etc/rc.d/spamd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: spamd,v 1.1 2011/07/07 23:29:45 robert Exp $
+# $OpenBSD: spamd,v 1.2 2011/07/08 02:15:34 robert Exp $
daemon="/usr/libexec/spamd"
@@ -11,6 +11,7 @@ pexp="spamd: \[priv\]"
rc_pre() {
[ X"${spamd_black}" != X"NO" ] && \
daemon_flags="-b ${daemon_flags}"
+ return 0
}
rc_cmd $1
diff --git a/etc/rc.d/spamlogd b/etc/rc.d/spamlogd
new file mode 100644
index 00000000000..b8620e01a8c
--- /dev/null
+++ b/etc/rc.d/spamlogd
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# $OpenBSD: spamlogd,v 1.1 2011/07/08 02:15:34 robert Exp $
+
+daemon="/usr/libexec/spamlogd"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_pre() {
+ [ X"${spamd_flags}" != X"NO" -a X"${spamd_black}" = X"NO" ]
+}
+
+rc_cmd $1
diff --git a/etc/rc.d/ypbind b/etc/rc.d/ypbind
index 7197e895869..e7e470c6cd2 100644
--- a/etc/rc.d/ypbind
+++ b/etc/rc.d/ypbind
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: ypbind,v 1.2 2011/07/07 18:23:17 robert Exp $
+# $OpenBSD: ypbind,v 1.3 2011/07/08 02:15:34 robert Exp $
daemon="/usr/sbin/ypbind"
@@ -10,8 +10,7 @@ rc_bg=YES
rc_reload=NO
rc_pre() {
- [ X"`domainname`" != X"" -a -d /var/yp/binding ] || \
- return 1
+ [ X"`domainname`" != X"" -a -d /var/yp/binding ]
}
rc_cmd $1
diff --git a/etc/rc.d/yppasswdd b/etc/rc.d/yppasswdd
index d3dd731faa2..07b5263452b 100644
--- a/etc/rc.d/yppasswdd
+++ b/etc/rc.d/yppasswdd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: yppasswdd,v 1.2 2011/07/07 18:23:17 robert Exp $
+# $OpenBSD: yppasswdd,v 1.3 2011/07/08 02:15:34 robert Exp $
daemon="/usr/sbin/rpc.yppasswdd"
@@ -23,6 +23,7 @@ rc_pre() {
sed -e 's/^Name: //'`
fi
[ "$_host2" != "$_host1" ] && return 1
+ return 0
}
rc_cmd $1
diff --git a/etc/rc.d/ypserv b/etc/rc.d/ypserv
index 6c189e036bf..3a94c5f6219 100644
--- a/etc/rc.d/ypserv
+++ b/etc/rc.d/ypserv
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: ypserv,v 1.2 2011/07/07 18:23:17 robert Exp $
+# $OpenBSD: ypserv,v 1.3 2011/07/08 02:15:34 robert Exp $
daemon="/usr/sbin/ypserv"
@@ -9,8 +9,7 @@ daemon="/usr/sbin/ypserv"
rc_reload=NO
rc_pre() {
- [ X"`domainname`" != X"" -a -d /var/yp/`domainname` ] || \
- return 1
+ [ X"`domainname`" != X"" -a -d /var/yp/`domainname` ]
}
rc_cmd $1