summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet111
1 files changed, 7 insertions, 4 deletions
diff --git a/rc.inet1 b/rc.inet1
index b18d535..b0ffb9a 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -159,7 +159,7 @@ br_open() {
debug_log "/sbin/ip link set dev ${IFNAME[$1]} type bridge $IFOPT"
/sbin/ip link set dev ${IFNAME[$1]} type bridge $IFOPT
fi
- done <<<"${IFOPTS[$i]}|" # The | on the end is required.
+ done <<<"${IFOPTS[$i]/%|*([[:blank:]])}|" # The | on the end is required.
debug_log "/sbin/ip link set dev ${IFNAME[$1]} up"
/sbin/ip link set dev ${IFNAME[$1]} up
}
@@ -206,7 +206,7 @@ bond_create() {
debug_log "/sbin/ip link set dev ${IFNAME[$1]} type bond $IFOPT"
/sbin/ip link set dev ${IFNAME[$1]} type bond $IFOPT
fi
- done <<<"${IFOPTS[$1]}|" # The | on the end is required.
+ done <<<"${IFOPTS[$1]/%|*([[:blank:]])}|" # The | on the end is required.
}
# Function to destroy a bond.
@@ -288,7 +288,7 @@ if_up() {
debug_log "/sbin/ip link set dev ${1} type vlan $IFOPT"
/sbin/ip link set dev ${1} type vlan $IFOPT
fi
- done <<<"${IFOPTS[$i]}|" # The | on the end is required.
+ done <<<"${IFOPTS[$i]/%|*([[:blank:]])}|" # The | on the end is required.
elif [ -z "${BONDNICS[$i]}" ] && [ -z "${BRNICS[$i]}" ]; then
# Only apply IFOPTS for a physical interface if it's not been handled
# by a higher level interface.
@@ -297,7 +297,7 @@ if_up() {
debug_log "/sbin/ip link set dev ${1} $IFOPT"
/sbin/ip link set dev ${1} $IFOPT
fi
- done <<<"${IFOPTS[$i]}|" # The | on the end is required.
+ done <<<"${IFOPTS[$i]/%|*([[:blank:]])}|" # The | on the end is required.
fi
# Set hardware address:
if [ -n "${HWADDR[$i]}" ]; then
@@ -637,6 +637,9 @@ stop() {
### MAIN ###
############
+# extglob is required for some functionallity.
+shopt -s extglob
+
case "${1}" in
start|up) # "start" (or "up") brings up all configured interfaces:
start