aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-12-21 16:06:02 +0000
committerCy Schubert <cy@FreeBSD.org>2023-02-01 02:53:11 +0000
commit3f89a29748755a6bd06d8bb1f3ed77aa9e2b6293 (patch)
treee7741a50198393dda3f78119d122ceebc18afa7c /libexec
parent47745a74f28d25754a3f1050e31211dd0b5137b8 (diff)
downloadsrc-3f89a29748755a6bd06d8bb1f3ed77aa9e2b6293.tar.gz
src-3f89a29748755a6bd06d8bb1f3ed77aa9e2b6293.zip
network.subr: Replace "\ " with "[[:space:]]"
"[[:space:]]" is easier to read than "\ " and is conisitent with clone_up(). Reported by: eugen Differential Revision: https://reviews.freebsd.org/D37748 (cherry picked from commit fef0e429f190d396d5b3228166a012e85dd912f2)
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rc/network.subr40
1 files changed, 20 insertions, 20 deletions
diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr
index f79e9314043c..76a5b94bc408 100644
--- a/libexec/rc/network.subr
+++ b/libexec/rc/network.subr
@@ -710,7 +710,7 @@ ipv4_down()
for _inet in $inetList ; do
# get rid of extraneous line
case $_inet in
- inet\ *) ;;
+ inet[[:space:]]*) ;;
*) continue ;;
esac
@@ -750,7 +750,7 @@ ipv6_down()
for _inet6 in $inetList ; do
# get rid of extraneous line
case $_inet6 in
- inet6\ *) ;;
+ inet6[[:space:]]*) ;;
*) continue ;;
esac
@@ -1017,7 +1017,7 @@ ifalias_af_common_handler()
_args=$*
case $_args in
- ${_af}\ *) ;;
+ ${_af}[[:space:]]*) ;;
*) return ;;
esac
@@ -1031,11 +1031,11 @@ ifalias_af_common_handler()
case $_c in
${_af})
case $_tmpargs in
- ${_af}\ *[0-9a-fA-F]-*)
+ ${_af}[[:space:]]*[0-9a-fA-F]-*)
ifalias_af_common_handler $_if $_af $_action \
- `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }`
+ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}[[:space:]]}`
;;
- ${_af}\ *)
+ ${_af}[[:space:]]*)
${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0
;;
esac
@@ -1049,11 +1049,11 @@ ifalias_af_common_handler()
# Process the last component if any.
if [ -n "${_tmpargs}" ]; then
case $_tmpargs in
- ${_af}\ *[0-9a-fA-F]-*)
+ ${_af}[[:space:]]*[0-9a-fA-F]-*)
ifalias_af_common_handler $_if $_af $_action \
- `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }`
+ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}[[:space:]]}`
;;
- ${_af}\ *)
+ ${_af}[[:space:]]*)
${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0
;;
esac
@@ -1086,10 +1086,10 @@ ifalias_af_common()
eval ifconfig_args=\"\$$alias\"
_iaf=
case $ifconfig_args in
- inet\ *) _iaf=inet ;;
- inet6\ *) _iaf=inet6 ;;
- link\ *) _iaf=link ;;
- ether\ *) _iaf=ether ;;
+ inet[[:space:]]*) _iaf=inet ;;
+ inet6[[:space:]]*) _iaf=inet6 ;;
+ link[[:space:]]*) _iaf=link ;;
+ ether[[:space:]]*) _iaf=ether ;;
esac
case ${_af}:${_action}:${_iaf}:"${ifconfig_args}" in
@@ -1137,7 +1137,7 @@ ifalias_af_common()
case $_c in
inet|inet6|link|ether)
case $_tmpargs in
- ${_af}\ *)
+ ${_af}[[:space:]]*)
eval ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0
;;
esac
@@ -1149,7 +1149,7 @@ ifalias_af_common()
done
# Process the last component
case $_tmpargs in
- ${_af}\ *)
+ ${_af}[[:space:]]*)
ifalias_af_common_handler $_if $_af $_action $_tmpargs && _ret=0
;;
esac
@@ -1262,7 +1262,7 @@ wlan_up()
create_args="wlandev $parent `get_if_var $child create_args_IF`"
debug_flags="`get_if_var $child wlandebug_IF`"
case $_iflist in
- ""|$child|$child\ *|*\ $child\ *|*\ $child) ;;
+ ""|$child|$child[[:space:]]*|*[[:space:]]$child[[:space:]]*|*[[:space:]]$child) ;;
*) continue ;;
esac
# Skip if ${child} already exists.
@@ -1302,7 +1302,7 @@ wlan_down()
child_wlans=`get_if_var $parent wlans_IF`
for child in ${child_wlans}; do
case $_iflist in
- ""|$child|$child\ *|*\ $child\ *|*\ $child) ;;
+ ""|$child|$child[[:space:]]*|*[[:space:]]$child[[:space:]]*|*[[:space:]]$child) ;;
*) continue ;;
esac
# Skip if ${child} doesn't exists.
@@ -1335,7 +1335,7 @@ clone_up()
# Parse ifn:ifopt.
OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
case $_iflist in
- ""|$ifn|$ifn\ *|*\ $ifn\ *|*\ $ifn) ;;
+ ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
*) continue ;;
esac
case $ifn in
@@ -1371,7 +1371,7 @@ clone_up()
# Parse ifn:ifopt.
OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
case $_iflist in
- ""|$ifn|$ifn\ *|*\ $ifn\ *|*\ $ifn) ;;
+ ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
*) continue ;;
esac
# Skip if ifn already exists.
@@ -1436,7 +1436,7 @@ clone_down()
*:1) continue ;; # global sticky knob == 1
esac
case $_iflist in
- ""|$ifn|$ifn\ *|*\ $ifn\ *|*\ $ifn) ;;
+ ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
*) continue ;;
esac
case $ifn in