summaryrefslogtreecommitdiff
path: root/etc/rc.d/syslogd
diff options
context:
space:
mode:
authorRobert Nagy <robert@cvs.openbsd.org>2011-07-06 18:55:37 +0000
committerRobert Nagy <robert@cvs.openbsd.org>2011-07-06 18:55:37 +0000
commit051efd2013144227b104e47c08bdc09c2e1508d8 (patch)
treebf1ba0f515d3bcea1c9fe050ab655a625d3e12d7 /etc/rc.d/syslogd
parenta7a68c90254263498131236819cdb7e7740c05a1 (diff)
Add rc.d(8) script for the system daemons that are restartable.
From now on rc(8) is going to call these scripts to start them up on boot in the same order than before. In addition the inetd and rwhod variables in rc.conf are deprecated so that inetd_flags and rwhod_flags should be used. The old flags are still going to be used for some time to allow users to switch. There are more rc modifications to come later so let's put this in so we can base more work on this. It is important to mention that you can still keep using rc.local just like the way you did before, and we have no intention to remove that either. I'd also like to thank ajacoutot@, halex@, sthen@ and schwarze@ for working on this with me.
Diffstat (limited to 'etc/rc.d/syslogd')
-rw-r--r--etc/rc.d/syslogd24
1 files changed, 24 insertions, 0 deletions
diff --git a/etc/rc.d/syslogd b/etc/rc.d/syslogd
new file mode 100644
index 00000000000..8f82c846e59
--- /dev/null
+++ b/etc/rc.d/syslogd
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# $OpenBSD: syslogd,v 1.1 2011/07/06 18:55:36 robert Exp $
+
+daemon="/usr/sbin/syslogd"
+
+. /etc/rc.d/rc.subr
+
+pexp="syslogd: \[priv\]"
+
+rc_pre() {
+ [ X"${httpd_flags}" != X"-u" ] && rm -f /var/www/dev/log && \
+ daemon_flags="${daemon_flags} -a /var/www/dev/log"
+ [ X"${named_flags}" != X"NO" ] && rm -f /var/named/dev/log && \
+ daemon_flags="${daemon_flags} -a /var/named/dev/log"
+ [ X"${nsd_flags}" != X"NO" ] && rm -f /var/nsd/dev/log && \
+ daemon_flags="${daemon_flags} -a /var/nsd/dev/log"
+ [ -d /var/empty ] && rm -f /var/empty/dev/log && \
+ mkdir -p -m 0555 /var/empty/dev && \
+ daemon_flags="${daemon_flags} -a /var/empty/dev/log"
+ rm -f /dev/log
+}
+
+rc_cmd $1