Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 78278 Details for
Bug 120519
madwifi-tools wlanconfig integration to Gentoo's rc-scripts
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Madwifi rcscript
madwifi (text/plain), 3.04 KB, created by
Antti Mäkelä
on 2006-01-27 02:51:34 UTC
(
hide
)
Description:
Madwifi rcscript
Filename:
MIME Type:
Creator:
Antti Mäkelä
Created:
2006-01-27 02:51:34 UTC
Size:
3.04 KB
patch
obsolete
># Copyright (c) 2004-2005 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header$ > ># Based on bridge script, which was ># Contributed by Roy Marples (uberlord@gentoo.org) > ># Fix any potential localisation problems ># Note that LC_ALL trumps LC_anything_else according to locale(7) >madwifi() { > LC_ALL=C /sbin/wlanconfig "$@" >} > ># char* madwifi_provides(void) ># ># Returns a string to change module definition for starting up >madwifi_provides() { > echo "madwifi" >} > ># void madwifi_depend(void) ># ># Sets up the dependancies for the module >madwifi_depend() { > after interface > after wireless > before dhcp >} > ># bool madwifi_check_installed(void) ># ># Returns 1 if bridge is installed, otherwise 0 >madwifi_check_installed() { > [[ -x /sbin/wlanconfig ]] && return 0 > ${1:-false} && eerror "For madwifi support, emerge net-wireless/madwifi-tools" > return 1 >} > ># bool madwifi_check_depends(void) ># ># Checks to see if we have the needed functions >madwifi_check_depends() { > local f > > for f in interface_variable interface_down interface_del_addresses interface_set_flag; do > [[ $( type -t ${f} ) == function ]] && continue > eerror "wlanconfig: missing required function ${f}\n" > return 1 > done > > return 0 >} > ># char* madwifi_get_vars(char *interface) ># ># Returns a string spaced with possible user set ># configuration variables >madwifi_get_vars() { > echo "madwifi_${1} wlanconfig_${1}" >} > ># bool madwifi_start(char *iface) ># ># #set up bridge >madwifi_pre_start() { > local iface=${1} ports i e x ifvar=$( interface_variable ${1} ) > local -a opts > eval ports=\"\$\{madwifi_${ifvar}\[@\]\}\" > > [[ -z ${ports} ]] && return 0 > > ebegin "Creating madwifi virtual interfaces based on ${iface}" > eindent > > for i in ${ports}; do > ebegin "${i}" > eval portmode=$( eval echo \$\{mode_${i}\} | tr '[:upper:]' '[:lower:]' ) > portmode=${portmode:-managed} >## Ugly but works > if [[ ${portmode} == "auto" || ${portmode} == "managed" ]] ; > then > portmode="sta" > fi > if [[ ${portmode} == "ad-hoc" ]] ; then > portmode="adhoc" > fi > if [[ ${portmode} == "master" ]] ; then > portmode="ap" > fi > einfo "Creating port ${i} in mode ${portmode}" > e=$( wlanconfig ${i} create wlandev ${iface} wlanmode ${portmode} 2>&1 ) > if [[ ${e} != ${i} ]]; then > eend 1 "${e}" > return 1 > fi > eend 0 > done > eoutdent > > return 0 >} > >madwifi_stop() { > local iface=${1} ports i e x ifvar=$( interface_variable ${1} ) > local -a opts > eval ports=\"\$\{madwifi_${ifvar}\[@\]\}\" > > [[ -z ${ports} ]] && return 0 > > ebegin "Destroying madwifi virtual interfaces based on ${iface}" > for i in ${ports}; do > ebegin "${i}" > portmode="sta" > eval portmode=\"\$\{mode_${i}\[@\]\}\" > e=$( wlanconfig ${i} destroy 2>&1 ) > if [[ -n ${e} ]]; then > eend 1 "${e}" > return 1 > fi > eend 0 > done > eoutdent > > eend 0 > return 0 >} >
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 Raw
Actions:
View
Attachments on
bug 120519
: 78278 |
90373
|
90387