View | Details | Raw Unified | Return to bug 18388
Collapse All | Expand All

(-)a/scripts/config-wireless (-5 / +9 lines)
Lines 4-15 Link Here
4
4
5
usage()
5
usage()
6
{
6
{
7
	echo "Usage: $0 <interface>" >&2
7
	echo "Usage: $0 <interface> [_prep]" >&2
8
	exit 1
8
	exit 1
9
}
9
}
10
10
11
[ -z "$1" ] && usage
11
[ -z "$1" ] && usage
12
NAME=$1
12
NAME=$1
13
# I need to do some things (setting the mode) before it is UP!
14
# Suffix _prep is used for calling this stage in ifup-common ("prepare").
15
# (The code is general enough for any other stages/variants and resp. suffixes.)
16
STAGE="$2"
13
17
14
pickup_defaults
18
pickup_defaults
15
pickup_options
19
pickup_options
Lines 18-31 pickup_options Link Here
18
22
19
# configure private extensions
23
# configure private extensions
20
if [ -x "${IWPRIV:=$DEFAULT_IWPRIV}" ]; then
24
if [ -x "${IWPRIV:=$DEFAULT_IWPRIV}" ]; then
21
	xargise_file $IFACEDIR/default/iwpriv "$IWPRIV $NAME"
25
	xargise_file $IFACEDIR/default/iwpriv"$STAGE" "$IWPRIV $NAME"
22
	xargise_file $MYIFACEDIR/iwpriv "$IWPRIV $NAME"
26
	xargise_file $MYIFACEDIR/iwpriv"$STAGE" "$IWPRIV $NAME"
23
fi
27
fi
24
28
25
# configure WEP
29
# configure WEP
26
if [ -x "${IWCONFIG:=$DEFAULT_IWCONFIG}" ]; then
30
if [ -x "${IWCONFIG:=$DEFAULT_IWCONFIG}" ]; then
27
	xargise_file $IFACEDIR/default/iwconfig "$IWCONFIG $NAME"
31
	xargise_file $IFACEDIR/default/iwconfig"$STAGE" "$IWCONFIG $NAME"
28
	xargise_file $MYIFACEDIR/iwconfig "$IWCONFIG $NAME"
32
	xargise_file $MYIFACEDIR/iwconfig"$STAGE" "$IWCONFIG $NAME"
29
fi
33
fi
30
34
31
# configure WPA
35
# configure WPA
(-)a/scripts/ifup-common (+8 lines)
Lines 199-204 if ! is_yes $IN_WPA_CLI; then # non-wifi or first pass for wifi Link Here
199
    xargise_file $IFACEDIR/default/iplink-$TYPE "$IP link set dev $NAME"
199
    xargise_file $IFACEDIR/default/iplink-$TYPE "$IP link set dev $NAME"
200
    xargise_file $MYIFACEDIR/iplink "$IP link set dev $NAME"
200
    xargise_file $MYIFACEDIR/iplink "$IP link set dev $NAME"
201
201
202
# handle wireless extensions, if any
203
    if is_yes "$CONFIG_WIRELESS" && is_wireless $NAME; then
204
	$SCRIPTDIR/config-wireless $NAME _prep
205
	rc=$?
206
	[ $rc -eq 2 ] || exit $rc
207
	print_progress
208
    fi
209
202
# bring iface up
210
# bring iface up
203
    if ! is_yes $KEEP_DOWN; then
211
    if ! is_yes $KEEP_DOWN; then
204
	$IP link set dev $NAME up && print_progress
212
	$IP link set dev $NAME up && print_progress

Return to bug 18388