1301973Sdteske#!/bin/sh
2301973Sdteske#-
3301973Sdteske# Copyright (c) 2011 Nathan Whitehorn
4301973Sdteske# Copyright (c) 2013 Tom Rhodes
5301973Sdteske# Copyright (c) 2013-2016 Devin Teske
6301973Sdteske# All rights reserved.
7301973Sdteske#
8301973Sdteske# Redistribution and use in source and binary forms, with or without
9301973Sdteske# modification, are permitted provided that the following conditions
10301973Sdteske# are met:
11301973Sdteske# 1. Redistributions of source code must retain the above copyright
12301973Sdteske#    notice, this list of conditions and the following disclaimer.
13301973Sdteske# 2. Redistributions in binary form must reproduce the above copyright
14301973Sdteske#    notice, this list of conditions and the following disclaimer in the
15301973Sdteske#    documentation and/or other materials provided with the distribution.
16301973Sdteske#
17301973Sdteske# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18301973Sdteske# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19301973Sdteske# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20301973Sdteske# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21301973Sdteske# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22301973Sdteske# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23301973Sdteske# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24301973Sdteske# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25301973Sdteske# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26301973Sdteske# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27301973Sdteske# SUCH DAMAGE.
28301973Sdteske#
29301973Sdteske# $FreeBSD$
30301973Sdteske#
31301973Sdteske############################################################ INCLUDES
32301973Sdteske
33301973Sdteske# Prevent device.subr (included indirectly) from auto scanning on load
34301973SdteskeDEVICE_SELF_SCAN_ALL=NO
35301973Sdteske
36301973SdteskeBSDCFG_SHARE="/usr/share/bsdconfig"
37301973Sdteske. $BSDCFG_SHARE/common.subr || exit 1
38301973Sdteskef_dprintf "%s: loading includes..." "$0"
39301973Sdteskef_include $BSDCFG_SHARE/dialog.subr
40301973Sdteskef_include $BSDCFG_SHARE/media/wlan.subr
41301973Sdteskef_include $BSDCFG_SHARE/mustberoot.subr
42301973Sdteske
43301973SdteskeBSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking"
44301973Sdteskef_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr
45301973Sdteske
46301973Sdteskef_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
47301973Sdteske	pgm="${ipgm:-$pgm}"
48301973Sdteske
49301973Sdteske############################################################ MAIN
50301973Sdteske
51301973Sdteske# Incorporate rc-file if it exists
52301973Sdteske[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
53301973Sdteske
54301973Sdteske#
55301973Sdteske# Process command-line arguments
56301973Sdteske#
57301973Sdteskewhile getopts h$GETOPTS_STDARGS flag; do
58301973Sdteske	case "$flag" in
59301973Sdteske	h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;;
60301973Sdteske	esac
61301973Sdteskedone
62301973Sdteskeshift $(( $OPTIND - 1 ))
63301973Sdteske
64301973Sdteske#
65301973Sdteske# Initialize
66301973Sdteske#
67301973Sdteskef_dialog_title "$msg_wireless_networks"
68301973Sdteskef_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
69301973Sdteskef_mustberoot_init
70301973Sdteske
71301973Sdteske#
72301973Sdteske# Launch the wireless network menu
73301973Sdteske#
74301973Sdteskef_dialog_menu_wireless_edit
75301973Sdteske
76301973Sdteske################################################################################
77301973Sdteske# END
78301973Sdteske################################################################################
79