diff options
author | Roy Marples <roy@marples.name> | 2007-04-06 19:38:23 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-06 19:38:23 +0000 |
commit | 25d219a086a7e6939569204d1ad048dd24169227 (patch) | |
tree | efe7fb3e4d1438ea4744b1b749793a3b5a1a785e | |
parent | ab62a84790950cbc321b9251197b332461f480c6 (diff) |
Use character classes in sed
-rw-r--r-- | net.BSD/iwconfig.sh | 8 | ||||
-rw-r--r-- | net.Linux/vlan.sh | 2 | ||||
-rw-r--r-- | 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 |