projects
/
grml-network.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump Standard to Version 3.8.2 (no further changes)
[grml-network.git]
/
sbin
/
grml-bridge
diff --git
a/sbin/grml-bridge
b/sbin/grml-bridge
index
c7decc7
..
b15ad98
100755
(executable)
--- a/
sbin/grml-bridge
+++ b/
sbin/grml-bridge
@@
-45,12
+45,20
@@
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 $?
;;
esac
brctl stp "$BRIDGE_NAME" $STP
eend $?
;;
esac
+ einfo "Bringing network device up: "
+ eindent
+ for i in $BRIDGE_DEVICES ; do
+ einfo "$i"
+ ifconfig "$i" 0.0.0.0 up ; eend $?
+ done
+ eoutdent
+
einfo "Enabling promiscous mode on: "
eindent
for i in $BRIDGE_DEVICES ; do
einfo "Enabling promiscous mode on: "
eindent
for i in $BRIDGE_DEVICES ; do
@@
-92,7
+100,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
+125,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