diff options
author | 2015-11-08 06:32:26 -0800 | |
---|---|---|
committer | 2015-11-08 06:32:26 -0800 | |
commit | 987d3676f04dc8d9b75d5ef11a4b1ed15c9b1f3e (patch) | |
tree | 184d9c152ae775625b1d3d6172f63d7ba3cf3964 | |
parent | Merge pull request #15 from alonbl/bridge (diff) | |
parent | net: bridge: add warning when using sysfs variables without prefix (diff) | |
download | netifrc-987d3676f04dc8d9b75d5ef11a4b1ed15c9b1f3e.tar.gz netifrc-987d3676f04dc8d9b75d5ef11a4b1ed15c9b1f3e.tar.bz2 netifrc-987d3676f04dc8d9b75d5ef11a4b1ed15c9b1f3e.zip |
Merge pull request #17 from alonbl/bridge
net: bridge: add warning when using sysfs variables without prefix
-rw-r--r-- | net/bridge.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge.sh b/net/bridge.sh index 407b578..3dfd8b1 100644 --- a/net/bridge.sh +++ b/net/bridge.sh @@ -129,6 +129,7 @@ bridge_pre_start() for prefix in "" bridge_; do eval s=\$${prefix}${n}_${IFVAR} if [ -n "${s}" ]; then + [ -z "${prefix}" ] && ewarn "sysfs key '${n}_${IFVAR}' should be prefixed, please add bridge_ prefix." einfo "Setting ${n}: ${s}" echo "${s}" >"${x}" || \ eerror "Failed to configure $n (${n}_${IFVAR})" @@ -167,6 +168,7 @@ bridge_pre_start() for prefix in "" brport_; do eval s=\$${prefix}${n}_${IFVAR} if [ -n "${s}" ]; then + [ -z "${prefix}" ] && ewarn "sysfs key '${n}_${IFVAR}' should be prefixed, please add brport_ prefix." einfo "Setting ${n}@${IFACE}: ${s}" echo "${s}" >"${x}" || \ eerror "Failed to configure $n (${n}_${IFVAR})" |