projects
/
grml-network.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4081dd
)
Improve error handling in grml-bridge
v0.2.6
author
Michael Prokop
<mika@grml.org>
Wed, 8 Apr 2009 22:13:38 +0000
(
00:13
+0200)
committer
Michael Prokop
<mika@grml.org>
Wed, 8 Apr 2009 22:15:38 +0000
(
00:15
+0200)
sbin/grml-bridge
patch
|
blob
|
history
diff --git
a/sbin/grml-bridge
b/sbin/grml-bridge
index
c7decc7
..
c74c8cc
100755
(executable)
--- a/
sbin/grml-bridge
+++ b/
sbin/grml-bridge
@@
-45,7
+45,7
@@
case "$1" in
no|false)
;;
*)
no|false)
;;
*)
- einfo "Setting Spanning-Tree Protocol (STP) to status"
+ einfo "Setting Spanning-Tree Protocol (STP) to status
$STP
"
brctl stp "$BRIDGE_NAME" $STP
eend $?
;;
brctl stp "$BRIDGE_NAME" $STP
eend $?
;;
@@
-92,7
+92,9
@@
case "$1" in
eindent
if [ $BRIDGE_CONFIG = DHCP ]; then
einfo "Terminating dhclient for $BRIDGE_NAME"
eindent
if [ $BRIDGE_CONFIG = DHCP ]; then
einfo "Terminating dhclient for $BRIDGE_NAME"
- kill $(cat /var/run/dhclient.$BRIDGE_NAME.pid);
+ if [ -r "/var/run/dhclient.$BRIDGE_NAME.pid" ] ; then
+ kill "$(cat /var/run/dhclient.$BRIDGE_NAME.pid)" || /bin/true
+ fi
fi
einfo "Removing network devices from $BRIDGE_NAME: "
fi
einfo "Removing network devices from $BRIDGE_NAME: "
@@
-115,6
+117,7
@@
case "$1" in
ip link set "$BRIDGE_NAME" down; eend $?
einfo "Removing bridge device"
ip link set "$BRIDGE_NAME" down; eend $?
einfo "Removing bridge device"
+ ifconfig "$BRIDGE_NAME" down || /bin/true
brctl delbr "$BRIDGE_NAME"
eend $?
eoutdent
brctl delbr "$BRIDGE_NAME"
eend $?
eoutdent