summaryrefslogtreecommitdiffstats
path: root/etc/pccard_ether
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-09-02 12:46:42 +0000
committerglebius <glebius@FreeBSD.org>2015-09-02 12:46:42 +0000
commit45daa1528349896e8e6baa64048525a342cd8955 (patch)
tree35794ba94b3606028f567a6196803ceedcd6e431 /etc/pccard_ether
parentbc8e82466a182759b3bdeed08d4d9813ff699b37 (diff)
downloadFreeBSD-src-45daa1528349896e8e6baa64048525a342cd8955.zip
FreeBSD-src-45daa1528349896e8e6baa64048525a342cd8955.tar.gz
Fix dynamic attach/detach of 802.11 devices after r287197:
o In pccard_ether add code to start children of a 802.11 device, that are configured in rc.conf. o In devd.conf provide a regex matching all 802.11 devices, and on match run pccard_ether to spawn children. PR: 202784 Submitted by: <vidwer gmail.com> In collaboration with: "Oleg V. Nauman" <oleg opentransfer.com>
Diffstat (limited to 'etc/pccard_ether')
-rwxr-xr-xetc/pccard_ether17
1 files changed, 17 insertions, 0 deletions
diff --git a/etc/pccard_ether b/etc/pccard_ether
index 5bd9c33..7d324a1 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -17,6 +17,9 @@ stop_precmd="checkauto"
stop_cmd="pccard_ether_stop"
restart_precmd="checkauto"
restart_cmd="pccard_ether_restart"
+startchildren_cmd="pccard_ether_startchildren"
+stopchildren_cmd="pccard_ether_stopchildren"
+extra_commands="startchildren stopchildren"
setup_routes()
{
@@ -114,6 +117,20 @@ pccard_ether_restart()
pccard_ether_start
}
+pccard_ether_startchildren()
+{
+ for child in `get_if_var $ifn wlans_IF`; do
+ /etc/rc.d/netif quietstart $child
+ done
+}
+
+pccard_ether_stopchildren()
+{
+ for child in `get_if_var $ifn wlans_IF`; do
+ /etc/rc.d/netif quietstop $child
+ done
+}
+
ifn=$1
shift
if [ -z "$*" ]; then
OpenPOWER on IntegriCloud