From: Michael Tremer Date: Sun, 24 May 2009 15:35:33 +0000 (+0200) Subject: network: Made config command for stp. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c25c6960297dcce5effa2b9562692cd3a1f41253;p=ipfire-3.x.git network: Made config command for stp. --- diff --git a/src/network/lib/hooks/stp b/src/network/lib/hooks/stp index 7b795edb2..05c04e18c 100644 --- a/src/network/lib/hooks/stp +++ b/src/network/lib/hooks/stp @@ -39,7 +39,40 @@ case "${1}" in ;; config) - : # TODO + shift 2 + while [ $# -gt 0 ]; do + case "$1" in + --ageing=*) + AGEING=${1#--ageing=} + ;; + --priority=*) + PRIORITY=${1#--priority=} + ;; + --delay=*) + DELAY=${1#--delay=} + ;; + --hello=*) + HELLO=${1#--hello=} + ;; + --maxage=*) + MAXAGE=${1#--maxage=} + ;; + *) + echo "Unknown option: $1" >&2 + exit 1 + ;; + esac + shift + done + cat << EOF >> ${CONFIG_ZONES}/${zone}/stp +HOOK=stp +AGEING=$AGEING +PRIORITY=$PRIORITY +DELAY=$DELAY +HELLO=$HELLO +MAXAGE=$MAXAGE +EOF + exit $? ;; *)