1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/rocknet/rocknet_base.sh
3 # Copyright (C) 2004 - 2022 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
19 a
="${x%(*}" b
="${x#*(}"
20 b
="${b/)}" b
="${b//,/ }"
21 if [ "$a" = "$b" ]; then
22 auto_if
[${#auto_if[*]}]="$a"
25 [ "$x" = "$profile" ] && \
26 auto_if
[${#auto_if[*]}]="$a"
35 prof
="${prof/)}" prof
="${prof//,/ }"
37 if [ "$if" = "$prof" ]; then
42 [ "$x" = "$profile" ] && ignore
=0
44 [ "$ignore" = 0 ] && pmatched
=1
47 if [ "$ignore" = 0 ]; then
48 if [ "$interface" = "auto" ]; then
50 for x
in "${auto_if[@]}"; do
51 [[ "$if" == $x ]] && ignore
=0
54 [ "$if" = "$interface" ] || ignore
=1
58 if [ "$ignore" = 0 ]; then
60 status
"Interface / profile matched: $if($prof)"
61 addcode up
9 9 "register $if\($prof\)"
62 addcode down
9 9 "unregister $if\($prof\)"