ALT Linux Bugzilla
– Attachment 3171 Details for
Bug 18388
some iwconfig actions can be done only *before* the interface is up
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
wireless-prep.patch
wireless-prep.patch (text/plain), 2.18 KB, created by
Ivan Zakharyaschev
on 2008-12-29 04:36:35 MSK
(
hide
)
Description:
wireless-prep.patch
Filename:
MIME Type:
Creator:
Ivan Zakharyaschev
Created:
2008-12-29 04:36:35 MSK
Size:
2.18 KB
patch
obsolete
>commit c701bdc19dbbee87baf5f5f942cc174d99121f6d >Author: Ivan Zakharyaschev <imz@altlinux.org> >Date: Sat Dec 27 03:54:04 2008 +0300 > > Improved the code: I need to do some things before a wireless iface is UP! > > It's for iwl3??? and for setting the mode -- see the example (wlan0/iwconfig_prep#TIBET). > >diff --git a/scripts/config-wireless b/scripts/config-wireless >index 62feb52..17be0db 100755 >--- a/scripts/config-wireless >+++ b/scripts/config-wireless >@@ -4,12 +4,16 @@ > > usage() > { >- echo "Usage: $0 <interface>" >&2 >+ echo "Usage: $0 <interface> [_prep]" >&2 > exit 1 > } > > [ -z "$1" ] && usage > NAME=$1 >+# I need to do some things (setting the mode) before it is UP! >+# Suffix _prep is used for calling this stage in ifup-common ("prepare"). >+# (The code is general enough for any other stages/variants and resp. suffixes.) >+STAGE="$2" > > pickup_defaults > pickup_options >@@ -18,14 +22,14 @@ pickup_options > > # configure private extensions > if [ -x "${IWPRIV:=$DEFAULT_IWPRIV}" ]; then >- xargise_file $IFACEDIR/default/iwpriv "$IWPRIV $NAME" >- xargise_file $MYIFACEDIR/iwpriv "$IWPRIV $NAME" >+ xargise_file $IFACEDIR/default/iwpriv"$STAGE" "$IWPRIV $NAME" >+ xargise_file $MYIFACEDIR/iwpriv"$STAGE" "$IWPRIV $NAME" > fi > > # configure WEP > if [ -x "${IWCONFIG:=$DEFAULT_IWCONFIG}" ]; then >- xargise_file $IFACEDIR/default/iwconfig "$IWCONFIG $NAME" >- xargise_file $MYIFACEDIR/iwconfig "$IWCONFIG $NAME" >+ xargise_file $IFACEDIR/default/iwconfig"$STAGE" "$IWCONFIG $NAME" >+ xargise_file $MYIFACEDIR/iwconfig"$STAGE" "$IWCONFIG $NAME" > fi > > # configure WPA >diff --git a/scripts/ifup-common b/scripts/ifup-common >index 5a897f7..93b6b9e 100755 >--- a/scripts/ifup-common >+++ b/scripts/ifup-common >@@ -199,6 +199,14 @@ if ! is_yes $IN_WPA_CLI; then # non-wifi or first pass for wifi > xargise_file $IFACEDIR/default/iplink-$TYPE "$IP link set dev $NAME" > xargise_file $MYIFACEDIR/iplink "$IP link set dev $NAME" > >+# handle wireless extensions, if any >+ if is_yes "$CONFIG_WIRELESS" && is_wireless $NAME; then >+ $SCRIPTDIR/config-wireless $NAME _prep >+ rc=$? >+ [ $rc -eq 2 ] || exit $rc >+ print_progress >+ fi >+ > # bring iface up > if ! is_yes $KEEP_DOWN; then > $IP link set dev $NAME up && print_progress
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 18388
: 3171 |
3172