projects
/
grml-network.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0b7e26a
)
grml-sniff: make sure network devices configured as BRIDGE_DEVICES exist
author
Michael Prokop
<mika@grml.org>
Fri, 24 May 2013 14:02:20 +0000
(16:02 +0200)
committer
Michael Prokop
<mika@grml.org>
Fri, 24 May 2013 14:02:20 +0000
(16:02 +0200)
sbin/grml-sniff
patch
|
blob
|
history
diff --git
a/sbin/grml-sniff
b/sbin/grml-sniff
index
3722c6a
..
cf41833
100755
(executable)
--- a/
sbin/grml-sniff
+++ b/
sbin/grml-sniff
@@
-32,6
+32,17
@@
fi
[ -n "$BRIDGE_NAME" ] || BRIDGE_NAME='br0'
[ -n "$BRIDGE_DEVICES" ] || BRIDGE_DEVICES='eth0 eth1'
+check_devs() {
+ for dev in $BRIDGE_DEVICES ; do
+ ip link show dev "$dev" >/dev/null 2>&1 || return 1
+ done
+}
+
+if ! check_devs ; then
+ eerror "BRIDGE_DEVICES $BRIDGE_DEVICES do not seem to exist." >&2
+ exit 1
+fi
+
check4progs $BRCTL || exit 1
case "$1" in