Reduce code duplication for wlan(4) interface creation in network.subr.
Since wlandebug(8) can accept any (original or changed) interface name this part may be simplified a bit.
This commit is contained in:
parent
e989c74331
commit
c92451ae9d
@ -1270,23 +1270,15 @@ wlan_up()
|
||||
fi
|
||||
if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then
|
||||
${IFCONFIG_CMD} $child create ${create_args} && cfg=0
|
||||
else
|
||||
${IFCONFIG_CMD} wlan create ${create_args} name $child && cfg=0
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
_list="$_list $child"
|
||||
fi
|
||||
if [ -n "${debug_flags}" ]; then
|
||||
wlandebug -i $child ${debug_flags}
|
||||
fi
|
||||
else
|
||||
i=`${IFCONFIG_CMD} wlan create ${create_args}`
|
||||
# XXXGL: wlandebug should accept any name
|
||||
if [ -n "${debug_flags}" ]; then
|
||||
wlandebug -i $i ${debug_flags}
|
||||
fi
|
||||
${IFCONFIG_CMD} $i name $child && cfg=0
|
||||
if [ $? -eq 0 ]; then
|
||||
_list="$_list $child"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [ -n "${_list# }" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user