Use character classes in sed

This commit is contained in:
Roy Marples 2007-04-06 19:38:23 +00:00
parent ab62a84790
commit 25d219a086
3 changed files with 2 additions and 10 deletions

View File

@ -475,14 +475,6 @@ iwconfig_configure() {
return 1
fi
# Do we have a preferred Access Point list specific to the interface?
# x="preferred_aps_${ifvar}[@]"
# [[ -n ${!x} ]] && preferred_aps=( "${!x}" )
# # Do we have a blacklist Access Point list specific to the interface?
# x="blacklist_aps_${ifvar}[@]"
# [[ -n ${!x} ]] && blacklist_aps=( "${!x}" )
# Are we forcing preferred only?
eval x=\$associate_order_${IFVAR}
[ -n "${x}" ] && associate_order=${x}

View File

@ -76,7 +76,7 @@ vlan_post_start() {
# We need to work out the interface name of our new vlan id
local ifname="$( \
sed -n -e 's/^\([^ \t]*\) *| '"${vlan}"' *| .*'"${iface}"'$/\1/p' \
sed -n -e 's/^\([^[:space:]]*\) *| '"${vlan}"' *| .*'"${iface}"'$/\1/p' \
/proc/net/vlan/config )"
mark_service_started "net.${ifname}"
(

View File

@ -87,7 +87,7 @@ wpa_supplicant_pre_start() {
fi
# Work out where the ctrl_interface dir is if it's not specified
local ctrl_dir=$(sed -n -e 's/[ \t]*#.*//g;s/[ \t]*$//g;s/^ctrl_interface=//p' "${cfgfile}")
local ctrl_dir=$(sed -n -e 's/[[:space:]]*#.*//g;s/[[:space:]]*$//g;s/^ctrl_interface=//p' "${cfgfile}")
if [ -z "${ctrl_dir}" ] ; then
ctrl_dir=${opts##* -C}
if [ -n "${ctrl_dir}" -a "${ctrl_dir}" != "${opts}" ] ; then