1*55620f43SDevin Teske#!/bin/sh 2*55620f43SDevin Teske#- 3*55620f43SDevin Teske# Copyright (c) 2011 Nathan Whitehorn 4*55620f43SDevin Teske# Copyright (c) 2013 Tom Rhodes 5*55620f43SDevin Teske# Copyright (c) 2013-2016 Devin Teske 6*55620f43SDevin Teske# All rights reserved. 7*55620f43SDevin Teske# 8*55620f43SDevin Teske# Redistribution and use in source and binary forms, with or without 9*55620f43SDevin Teske# modification, are permitted provided that the following conditions 10*55620f43SDevin Teske# are met: 11*55620f43SDevin Teske# 1. Redistributions of source code must retain the above copyright 12*55620f43SDevin Teske# notice, this list of conditions and the following disclaimer. 13*55620f43SDevin Teske# 2. Redistributions in binary form must reproduce the above copyright 14*55620f43SDevin Teske# notice, this list of conditions and the following disclaimer in the 15*55620f43SDevin Teske# documentation and/or other materials provided with the distribution. 16*55620f43SDevin Teske# 17*55620f43SDevin Teske# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18*55620f43SDevin Teske# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19*55620f43SDevin Teske# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20*55620f43SDevin Teske# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21*55620f43SDevin Teske# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22*55620f43SDevin Teske# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23*55620f43SDevin Teske# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24*55620f43SDevin Teske# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25*55620f43SDevin Teske# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26*55620f43SDevin Teske# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27*55620f43SDevin Teske# SUCH DAMAGE. 28*55620f43SDevin Teske# 29*55620f43SDevin Teske# 30*55620f43SDevin Teske############################################################ INCLUDES 31*55620f43SDevin Teske 32*55620f43SDevin Teske# Prevent device.subr (included indirectly) from auto scanning on load 33*55620f43SDevin TeskeDEVICE_SELF_SCAN_ALL=NO 34*55620f43SDevin Teske 35*55620f43SDevin TeskeBSDCFG_SHARE="/usr/share/bsdconfig" 36*55620f43SDevin Teske. $BSDCFG_SHARE/common.subr || exit 1 37*55620f43SDevin Teskef_dprintf "%s: loading includes..." "$0" 38*55620f43SDevin Teskef_include $BSDCFG_SHARE/dialog.subr 39*55620f43SDevin Teskef_include $BSDCFG_SHARE/media/wlan.subr 40*55620f43SDevin Teskef_include $BSDCFG_SHARE/mustberoot.subr 41*55620f43SDevin Teske 42*55620f43SDevin TeskeBSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" 43*55620f43SDevin Teskef_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr 44*55620f43SDevin Teske 45*55620f43SDevin Teskef_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && 46*55620f43SDevin Teske pgm="${ipgm:-$pgm}" 47*55620f43SDevin Teske 48*55620f43SDevin Teske############################################################ MAIN 49*55620f43SDevin Teske 50*55620f43SDevin Teske# Incorporate rc-file if it exists 51*55620f43SDevin Teske[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" 52*55620f43SDevin Teske 53*55620f43SDevin Teske# 54*55620f43SDevin Teske# Process command-line arguments 55*55620f43SDevin Teske# 56*55620f43SDevin Teskewhile getopts h$GETOPTS_STDARGS flag; do 57*55620f43SDevin Teske case "$flag" in 58*55620f43SDevin Teske h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; 59*55620f43SDevin Teske esac 60*55620f43SDevin Teskedone 61*55620f43SDevin Teskeshift $(( $OPTIND - 1 )) 62*55620f43SDevin Teske 63*55620f43SDevin Teske# 64*55620f43SDevin Teske# Initialize 65*55620f43SDevin Teske# 66*55620f43SDevin Teskef_dialog_title "$msg_wireless_networks" 67*55620f43SDevin Teskef_dialog_backtitle "${ipgm:+bsdconfig }$pgm" 68*55620f43SDevin Teskef_mustberoot_init 69*55620f43SDevin Teske 70*55620f43SDevin Teske# 71*55620f43SDevin Teske# Launch the wireless network menu 72*55620f43SDevin Teske# 73*55620f43SDevin Teskef_dialog_menu_wireless_edit 74*55620f43SDevin Teske 75*55620f43SDevin Teske################################################################################ 76*55620f43SDevin Teske# END 77*55620f43SDevin Teske################################################################################ 78