From 25d219a086a7e6939569204d1ad048dd24169227 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 6 Apr 2007 19:38:23 +0000 Subject: Use character classes in sed --- net.BSD/iwconfig.sh | 8 -------- net.Linux/vlan.sh | 2 +- net/wpa_supplicant.sh | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/net.BSD/iwconfig.sh b/net.BSD/iwconfig.sh index 912e0792..aa9057b4 100644 --- a/net.BSD/iwconfig.sh +++ b/net.BSD/iwconfig.sh @@ -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} diff --git a/net.Linux/vlan.sh b/net.Linux/vlan.sh index fef4f2c5..00a402bd 100644 --- a/net.Linux/vlan.sh +++ b/net.Linux/vlan.sh @@ -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}" ( diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh index 7ba5bb4f..9bbdc31c 100644 --- a/net/wpa_supplicant.sh +++ b/net/wpa_supplicant.sh @@ -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 -- cgit v1.2.3