]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added an interface bonding script.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 2 Feb 2009 16:52:43 +0000 (17:52 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 2 Feb 2009 16:52:43 +0000 (17:52 +0100)
src/initscripts/networking/services/bonding [new file with mode: 0644]

diff --git a/src/initscripts/networking/services/bonding b/src/initscripts/networking/services/bonding
new file mode 100644 (file)
index 0000000..f5ac0f5
--- /dev/null
@@ -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