aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-eth
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-03-31 10:35:49 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-03-31 10:42:47 +0200
commit3235be4a3da91bc91c698b318935240dbdf81aac (patch)
tree099c68e5d1476e2fcc9dc6acc7532408e4e79349 /sysconfig/network-scripts/ifup-eth
parenta224b37bfe0edbc492a3e4851b9d4af589042e4f (diff)
downloadinitscripts-3235be4a3da91bc91c698b318935240dbdf81aac.tar
initscripts-3235be4a3da91bc91c698b318935240dbdf81aac.tar.gz
initscripts-3235be4a3da91bc91c698b318935240dbdf81aac.tar.bz2
initscripts-3235be4a3da91bc91c698b318935240dbdf81aac.tar.xz
initscripts-3235be4a3da91bc91c698b318935240dbdf81aac.zip
network: add support for team devices
Currently, team masters and slaves are supported via ifup-Team* and ifdown-Team* scripts shipped in teamd package. It uses somehow ugly workaround where user have to specify DEVIVETYPE to "Team" or "TeamPort". This turned out to be non-optimal solution as this is confusing users. Also it does not work when TYPE is set. So fix this by adding the team support hooks directly into initscripts. Now for team port, user needs only to set: TEAM_MASTER="teamx" and for team master, user needs only to set: TEAM_CONFIG="...whatever..." Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'sysconfig/network-scripts/ifup-eth')
-rwxr-xr-xsysconfig/network-scripts/ifup-eth12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 29537607..e4acb170 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -74,6 +74,11 @@ if [ "${TYPE}" = "Tap" ]; then
ip tuntap add ${TUNMODE} ${OWNER} dev ${DEVICE} > /dev/null
fi
+# Team master initialization.
+if [ -n "${TEAM_CONFIG}" ] && [ ! "${DEVICETYPE}" = "Team" ] && [ -x ./ifup-Team ]; then
+ ./ifup-Team ${CONFIG} $2
+fi
+
# now check the real state
is_available ${REALDEVICE} || {
if [ -n "$alias" ]; then
@@ -98,6 +103,13 @@ fi
# is the device wireless? If so, configure wireless device specifics
is_wireless_device ${DEVICE} && . ./ifup-wireless
+# Team slave device?
+if [ -n "${TEAM_MASTER}" ] && [ ! "${DEVICETYPE}" = "TeamPort" ] && [ -x ./ifup-TeamPort ]; then
+ ./ifup-TeamPort ${CONFIG} $2
+ ethtool_set
+ exit 0
+fi
+
# slave device?
if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then
install_bonding_driver ${MASTER}