From: Sascha Wildner Date: Wed, 4 Jul 2007 16:28:45 +0000 (+0000) Subject: Add a hostapd rc script. X-Git-Tag: v2.0.1~2667 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/5c8b08ffffb87f45f7f9c80992e313cd65dc6ac0 Add a hostapd rc script. Obtained-from: FreeBSD --- diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 32a112a684..18b94499e9 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -14,7 +14,7 @@ # All arguments must be in double or single quotes. # # $FreeBSD: src/etc/defaults/rc.conf,v 1.180 2003/06/26 09:50:50 smkelly Exp $ -# $DragonFly: src/etc/defaults/rc.conf,v 1.38 2007/06/10 18:57:59 swildner Exp $ +# $DragonFly: src/etc/defaults/rc.conf,v 1.39 2007/07/04 16:28:45 swildner Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -137,6 +137,7 @@ ppp_profile="papchap" # Which profile to use from /etc/ppp/ppp.conf. ppp_user="root" # Which user to run ppp as ### Network daemon (miscellaneous) ### +hostapd_enable="NO" # Run hostap daemon. syslogd_enable="YES" # Run syslog daemon (or NO). syslogd_program="/usr/sbin/syslogd" # path to syslogd, if you want a different one. #syslogd_flags="-s" # Flags to syslogd (if enabled). diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 1d1421ca4d..1701d4f89a 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -1,6 +1,6 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ # $FreeBSD: src/etc/rc.d/Makefile,v 1.20 2003/06/29 05:15:57 mtm Exp $ -# $DragonFly: src/etc/rc.d/Makefile,v 1.19 2007/05/27 23:46:29 swildner Exp $ +# $DragonFly: src/etc/rc.d/Makefile,v 1.20 2007/07/04 16:28:45 swildner Exp $ .include @@ -9,8 +9,9 @@ FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz \ amd apm apmd atm1 atm2.sh atm3.sh \ battd bootparams ccd cleanvar \ - cleartmp cron dhclient dhcpd dhcrelay diskless dmesg dumpon fsck ftpd \ - hostname inetd initdiskless initrandom ip6fw ipfilter ipfs ipfw ipmon \ + cleartmp cron dhclient dhcpd dhcrelay diskless dmesg dumpon \ + fsck ftpd hostapd hostname \ + inetd initdiskless initrandom ip6fw ipfilter ipfs ipfw ipmon \ ipnat ipsec ipxrouted isdnd jail \ kadmind kerberos keyserv kldxref kpasswdd \ ldconfig local localdaemons lpd \ diff --git a/etc/rc.d/hostapd b/etc/rc.d/hostapd new file mode 100644 index 0000000000..f2221adb88 --- /dev/null +++ b/etc/rc.d/hostapd @@ -0,0 +1,23 @@ +#!/bin/sh +# +# $FreeBSD: src/etc/rc.d/hostapd,v 1.1 2006/02/03 01:35:36 flz Exp $ +# $DragonFly: src/etc/rc.d/hostapd,v 1.1 2007/07/04 16:28:45 swildner Exp $ +# + +# PROVIDE: hostapd +# REQUIRE: mountcritremote +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="hostapd" +command="/usr/sbin/${name}" +rcvar=`set_rcvar` + +conf_file="/etc/${name}.conf" + +command_args="-B ${conf_file}" +required_files="${conf_file}" + +load_rc_config ${name} +run_rc_command "$1" diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 0769f641cb..12585f7bff 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -23,8 +23,8 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.197 2003/07/28 13:56:00 mbr Exp $ -.\" $DragonFly: src/share/man/man5/rc.conf.5,v 1.40 2007/06/10 18:57:59 swildner Exp $ -.Dd June 2, 2007 +.\" $DragonFly: src/share/man/man5/rc.conf.5,v 1.41 2007/07/04 16:28:45 swildner Exp $ +.Dd July 4, 2007 .Dt RC.CONF 5 .Os .Sh NAME @@ -163,6 +163,13 @@ into individual filenames. The default is a space. It is not necessary to change this unless there are startup scripts with names containing spaces. +.It Va hostapd_enable +.Pq Vt bool +Set to +.Dq Li YES +to start +.Xr hostapd 8 +at system boot time. .It Va hostname .Pq Vt str The fully qualified domain name (FQDN) of this host on the network.