Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37910948
en ru br
ALT Linux repositórios
S:1.5-alt3
5.0: 1.4-alt2
4.1: 1.4-alt1
4.0: 1.2-alt2
3.0: 1.0.6-alt1

Group :: Sistema/Base
RPM: bridge-utils

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh
# Starts Layer 2 bridge
#
# chkconfig: 2345 05 95
# description: Layer 2 Bridge
#

LOCKFILE=/var/lock/subsys/bridge

[ -f /etc/sysconfig/bridge ] && . /etc/sysconfig/bridge

PATH=$PATH:/sbin:/usr/sbin

do_stop() {
[ -z "$INTERFACES" ] && exit 0
echo "Stopping Bridge"
for i in $INTERFACES $BRIDGE_INTERFACE ; do
ip link set $i down
done
brctl delbr $BRIDGE_INTERFACE
}

do_start() {
[ -z "$INTERFACES" ] && exit 0
echo "Starting Bridge"
for i in $INTERFACES ; do
ip link set $i up
done
brctl addbr br0
for i in $INTERFACES ; do
ip link set $i up
brctl addif br0 $i
done
ifup $BRIDGE_INTERFACE
}

case "$1" in
start)
do_start
touch "$LOCKFILE"
;;
stop)
do_stop
rm -f "$LOCKFILE"
;;
restart)
do_stop
sleep 1
do_start
;;
condrestart|condreload)
if [ -f "$LOCKFILE" ]; then
do_stop
sleep 1
do_start
fi
;;
condstop)
if [ -f "$LOCKFILE" ]; then
do_stop
rm -f "$LOCKFILE"
fi
;;
*)
echo "Usage: $0 {start|stop|restart|condrestart|condreload|condstop}"
exit 1
esac
exit 0
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009