diff options
author | Robert Nagy <robert@cvs.openbsd.org> | 2011-07-07 22:30:38 +0000 |
---|---|---|
committer | Robert Nagy <robert@cvs.openbsd.org> | 2011-07-07 22:30:38 +0000 |
commit | bfe036ab828b6511cb7b5c962a0eae874af4e991 (patch) | |
tree | 05807b833b0f23b62cf26412c482bfb708d9f6fe | |
parent | b858a7b9faff8675877e0fd1ddff3ee6b255fe27 (diff) |
add a script for btd and replace the rc parts
-rw-r--r-- | etc/Makefile | 4 | ||||
-rw-r--r-- | etc/rc | 12 | ||||
-rw-r--r-- | etc/rc.conf | 6 | ||||
-rw-r--r-- | etc/rc.d/btd | 13 |
4 files changed, 23 insertions, 12 deletions
diff --git a/etc/Makefile b/etc/Makefile index 143235c3c4e..d587982564c 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.301 2011/07/07 22:23:56 robert Exp $ +# $OpenBSD: Makefile,v 1.302 2011/07/07 22:30:37 robert Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -31,7 +31,7 @@ BIN1+= wsconsctl.conf BIN2= motd # -r-xr-xr-x -RCDAEMONS= apmd bgpd bootparamd cron dhcpd dhcrelay dvmrpd ftpd ftpproxy \ +RCDAEMONS= apmd 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 \ rarpd rbootd relayd ripd route6d rtadvd rtsold rwhod sasyncd \ @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.359 2011/07/07 22:23:56 robert Exp $ +# $OpenBSD: rc,v 1.360 2011/07/07 22:30:37 robert Exp $ # System startup script run by init on autoboot # or after single-user. @@ -573,14 +573,10 @@ if ifconfig lo0 inet6 >/dev/null 2>&1; then fi start_daemon hostapd rwhod lpd ldapd sendmail smtpd httpd ftpd \ - ftpproxy identd inetd rarpd bootparamd rbootd mopd + ftpproxy identd inetd rarpd bootparamd rbootd mopd btd -if [ X"${bt}" != X"NO" ]; then - echo -n ' btd'; btd - if [ -f ${bt_rules} ]; then - btctl -f ${bt_rules} - fi -fi +[ X"${bt}" != X"NO" -a -f ${bt_rules} ] && \ + btctl -f ${bt_rules} if [ X"${spamd_flags}" != X"NO" ]; then if [ X"${spamd_black}" != X"NO" ]; then diff --git a/etc/rc.conf b/etc/rc.conf index 536eefc8593..ab5e56934c2 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: rc.conf,v 1.146 2011/07/07 21:00:59 deraadt Exp $ +# $OpenBSD: rc.conf,v 1.147 2011/07/07 22:30:37 robert Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags ldpd_flags=NO # for normal use: "" @@ -52,6 +52,7 @@ 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 # use -u to disable chroot, see httpd(8) httpd_flags=NO # for normal use: "" (or "-DSSL" after reading ssl(8)) @@ -114,7 +115,7 @@ rc_scripts= local_rcconf="/etc/rc.conf.local" -unset inetd_flags rwhod_flags portmap_flags kdc_flags kadmind_flags kpasswdd_flags +unset inetd_flags rwhod_flags portmap_flags kdc_flags kadmind_flags kpasswdd_flags btd_flags [ -f ${local_rcconf} ] && . ${local_rcconf} # Do not edit this line @@ -125,3 +126,4 @@ unset inetd_flags rwhod_flags portmap_flags kdc_flags kadmind_flags kpasswdd_fla : ${kdc_flags=$([ X"${krb5_master_kdc-NO}" = XYES -o X"${krb5_slave_kdc-NO}" = XYES ] || echo NO)} : ${kadmind_flags=$([ X"${krb5_master_kdc-NO}" = XYES ] || echo NO)} : ${kpasswdd_flags=$([ X"${krb5_master_kdc-NO}" = XYES ] || echo NO)} +: ${btd_flags=$([ X"${bt-NO}" = XYES ] || echo NO)} diff --git a/etc/rc.d/btd b/etc/rc.d/btd new file mode 100644 index 00000000000..c3381c7a77c --- /dev/null +++ b/etc/rc.d/btd @@ -0,0 +1,13 @@ +#!/bin/sh +# +# $OpenBSD: btd,v 1.1 2011/07/07 22:30:37 robert Exp $ + +daemon="/usr/sbin/btd" + +. /etc/rc.d/rc.subr + +pexp="btd: \[priv\]" + +no_reload=YES + +rc_cmd $1 |