FreeBSD Bugzilla – Attachment 205158 Details for
Bug 238571
net/hostapd: hostapd_program not used by system rc.d scripts on 12.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to install wpa_supplicant and hostapd rc files when none exist in /etc/rc.d.
wpa-ports.diff (text/plain), 3.68 KB, created by
Cy Schubert
on 2019-06-17 03:15:07 UTC
(
hide
)
Description:
Patch to install wpa_supplicant and hostapd rc files when none exist in /etc/rc.d.
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2019-06-17 03:15:07 UTC
Size:
3.68 KB
patch
obsolete
>diff --git a/net/hostapd/Makefile b/net/hostapd/Makefile >index d0d5bd8efc4b..e8f77aba91fe 100644 >--- a/net/hostapd/Makefile >+++ b/net/hostapd/Makefile >@@ -21,6 +21,9 @@ LDFLAGS+= -L${OPENSSLLIB} > > PLIST_FILES= sbin/hostapd sbin/hostapd_cli man/man1/hostapd_cli.1.gz \ > man/man8/hostapd.8.gz >+.if !exists(/etc/rc.d/hostapd) >+USE_RC_SUBR= hostapd >+.endif > > post-patch: > @${REINPLACE_CMD} -e 's|@$$(E) " CC " $$<|@$$(E) " $$(CC) " $$<|' \ >diff --git a/net/hostapd/files/hostapd.in b/net/hostapd/files/hostapd.in >new file mode 100644 >index 000000000000..aee0f6f80809 >--- /dev/null >+++ b/net/hostapd/files/hostapd.in >@@ -0,0 +1,42 @@ >+#!/bin/sh >+# >+# $FreeBSD$ >+# >+ >+# PROVIDE: hostapd >+# REQUIRE: mountcritremote >+# KEYWORD: nojail shutdown >+ >+. /etc/rc.subr >+ >+name="hostapd" >+desc="Authenticator for IEEE 802.11 networks" >+# >+# This portion of this rc.script is different from base. >+case ${command} in >+/usr/sbin/hostapd) # Assume user does not want base hostapd because >+ # user specified WITHOUT_WIRELESS in make.conf >+ # and /etc/defaults/rc.conf contains this value. >+ unset command;; >+esac >+command=${hostapd_program:-%%PREFIX%%/sbin/hostapd} >+# End of differences from base. The rest of the file should remain the same. >+ >+ifn="$2" >+if [ -z "$ifn" ]; then >+ rcvar="hostapd_enable" >+ conf_file="/etc/${name}.conf" >+ pidfile="/var/run/${name}.pid" >+else >+ rcvar= >+ conf_file="/etc/${name}-${ifn}.conf" >+ pidfile="/var/run/${name}-${ifn}.pid" >+fi >+ >+command_args="-P ${pidfile} -B ${conf_file}" >+required_files="${conf_file}" >+required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp" >+extra_commands="reload" >+ >+load_rc_config ${name} >+run_rc_command "$1" >diff --git a/security/wpa_supplicant/Makefile b/security/wpa_supplicant/Makefile >index 9fd64db2b1d6..13ee5d09c7bf 100644 >--- a/security/wpa_supplicant/Makefile >+++ b/security/wpa_supplicant/Makefile >@@ -26,6 +26,10 @@ PORTDOCS= README ChangeLog > > CFG= ${BUILD_WRKSRC}/.config > >+.if !exists(/etc/rc.d/wpa_supplicant) >+USE_RC_SUBR= wpa_supplicant >+.endif >+ > OPTIONS_MULTI= DRV EAP > OPTIONS_MULTI_DRV= BSD WIRED NDIS TEST NONE #ROBOSWITCH > OPTIONS_MULTI_EAP= TLS PEAP TTLS MD5 MSCHAPV2 GTC LEAP OTP PSK FAST \ >diff --git a/security/wpa_supplicant/files/wpa_supplicant.in b/security/wpa_supplicant/files/wpa_supplicant.in >new file mode 100644 >index 000000000000..d8f0640f76c3 >--- /dev/null >+++ b/security/wpa_supplicant/files/wpa_supplicant.in >@@ -0,0 +1,57 @@ >+#!/bin/sh >+# >+# $FreeBSD$ >+# >+ >+# PROVIDE: wpa_supplicant >+# REQUIRE: mountcritremote >+# KEYWORD: nojail nostart >+ >+. /etc/rc.subr >+. /etc/network.subr >+ >+name="wpa_supplicant" >+desc="WPA/802.11i Supplicant for wireless network devices" >+rcvar= >+ >+ifn="$2" >+if [ -z "$ifn" ]; then >+ return 1 >+fi >+ >+is_ndis_interface() >+{ >+ case `sysctl -n net.wlan.${1#wlan}.%parent 2>/dev/null` in >+ ndis*) true ;; >+ *) false ;; >+ esac >+} >+ >+if is_wired_interface ${ifn} ; then >+ driver="wired" >+elif is_ndis_interface ${ifn} ; then >+ driver="ndis" >+else >+ driver="bsd" >+fi >+ >+load_rc_config $name >+ >+# >+# This portion of this rc.script is different from base. >+case ${command} in >+/usr/sbin/wpa_supplicant) # Assume user does not want base hostapd because >+ # user specified WITHOUT_WIRELESS in make.conf >+ # and /etc/defaults/rc.conf contains this value. >+ unset command;; >+esac >+command=${wpa_supplicant_program:-%%PREFIX%%/sbin/wpa_supplicant} >+# End of differences from base. The rest of the file should remain the same. >+ >+conf_file=${wpa_supplicant_conf_file} >+pidfile="/var/run/${name}/${ifn}.pid" >+command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile" >+required_files=$conf_file >+required_modules="wlan_wep wlan_tkip wlan_ccmp" >+ >+run_rc_command "$1"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238571
:
205079
|
205082
| 205158