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 |