From: Michael Tremer Date: Mon, 2 Feb 2009 16:52:43 +0000 (+0100) Subject: Added an interface bonding script. X-Git-Tag: v3.0-alpha1~44^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73be86982cd7fc9920679a81555fa59b590b3797;p=ipfire-3.x.git Added an interface bonding script. --- diff --git a/src/initscripts/networking/services/bonding b/src/initscripts/networking/services/bonding new file mode 100644 index 000000000..f5ac0f50a --- /dev/null +++ b/src/initscripts/networking/services/bonding @@ -0,0 +1,38 @@ +#!/bin/sh +######################################################################## +# Begin $NETWORK_DEVICES/services/bonding +# +# Description : Interface Bonding Script +# +# Authors : Michael Tremer - michael.tremer@ipfire.org +# +# Version : 00.00 +# +# Notes : This script collects two or more interfaces in one +# bonding intreface. +# +######################################################################## + +. /lib/lsb/init-functions +. ${IFCONFIG} + +case "${2}" in + up) + MESSAGE="Bringing up bonding interface ${1}..." + ifenslave ${1} ${SLAVE_INTERFACES} + evaluate_retval + ;; + + down) + MESSAGE="Bringing down bonding interface ${1}..." + modprobe -r bonding 2>/dev/null + evaluate_retval + ;; + + *) + echo "Usage: ${0} [interface] {up|down}" + exit 1 + ;; +esac + +# End $NETWORK_DEVICES/services/bonding