summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorflz <flz@FreeBSD.org>2006-02-03 01:35:36 +0000
committerflz <flz@FreeBSD.org>2006-02-03 01:35:36 +0000
commit06bbcb2dd7b9a082fb0fad39a3644f5ca5055356 (patch)
tree840525e0caad303df839dc5790cbad036ed9d54f /etc
parent155414961d2d86d1d240e429382e67a8a8bc5d09 (diff)
downloadFreeBSD-src-06bbcb2dd7b9a082fb0fad39a3644f5ca5055356.zip
FreeBSD-src-06bbcb2dd7b9a082fb0fad39a3644f5ca5055356.tar.gz
- Add a startup script for hostapd.
- Document associated variable in rc.conf(5). Approved by: dougb MFC after: 1 week
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf1
-rwxr-xr-xetc/rc.d/Makefile2
-rw-r--r--etc/rc.d/hostapd22
3 files changed, 24 insertions, 1 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 770ecb5..0acb903 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -184,6 +184,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 3aca51d..3d3be51 100755
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -12,7 +12,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
fsck ftpd \
gbde geli geli2 \
hcsecd \
- hostname \
+ hostapd hostname \
ike \
inetd initrandom \
ip6addrctl ip6fw ipfilter ipfs ipfw ipmon \
diff --git a/etc/rc.d/hostapd b/etc/rc.d/hostapd
new file mode 100644
index 0000000..b39b971
--- /dev/null
+++ b/etc/rc.d/hostapd
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# 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"
OpenPOWER on IntegriCloud