aboutsummaryrefslogtreecommitdiffstats
path: root/network-scripts/network-functions-ipv6
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2020-12-03 14:33:07 +0100
committerGitHub <noreply@github.com>2020-12-03 14:33:07 +0100
commit0ac0949b03cdfc2c06ba997e9b3b890a5ca17b1f (patch)
treea9244eff6f07459021449e22f33b8af96e23ca4d /network-scripts/network-functions-ipv6
parentab9a243d079d4e2122e094ae89d02d5ee7a4b791 (diff)
downloadinitscripts-0ac0949b03cdfc2c06ba997e9b3b890a5ca17b1f.tar
initscripts-0ac0949b03cdfc2c06ba997e9b3b890a5ca17b1f.tar.gz
initscripts-0ac0949b03cdfc2c06ba997e9b3b890a5ca17b1f.tar.bz2
initscripts-0ac0949b03cdfc2c06ba997e9b3b890a5ca17b1f.tar.xz
initscripts-0ac0949b03cdfc2c06ba997e9b3b890a5ca17b1f.zip
network: add option to keep the link down
Some interfaces like Open vSwitch bridges using the userspace datapath, needs the link to be kept down to avoid issues. Add a LINKSTATUS=[down|up] ifcfg parameter to add this functionality. If not specified, the link will default to up as before. Patch provided by Matteo Croce <mcroce@redhat.com>
Diffstat (limited to 'network-scripts/network-functions-ipv6')
-rw-r--r--network-scripts/network-functions-ipv68
1 files changed, 5 insertions, 3 deletions
diff --git a/network-scripts/network-functions-ipv6 b/network-scripts/network-functions-ipv6
index d1244815..a85a776d 100644
--- a/network-scripts/network-functions-ipv6
+++ b/network-scripts/network-functions-ipv6
@@ -10,6 +10,8 @@
#
#
+# Source network-functions due to need of set_link_up()
+. ./network-functions
##### Test for IPv6 capabilities
# $1: (optional) testflag: currently supported: "testonly" (do not load a module)
@@ -108,7 +110,7 @@ ipv6_enable_autotunnel() {
true
else
# bring up basic tunnel device
- /sbin/ip link set sit0 up
+ set_link_up sit0
if ! ipv6_test_device_status sit0; then
net_log $"Tunnel device 'sit0' enabling didn't work" err $fn
@@ -159,7 +161,7 @@ ipv6_add_addr_on_device() {
net_log $"Device '$device' doesn't exist" err $fn
return 3
else
- /sbin/ip link set $device up
+ set_link_up $device
if ! ipv6_test_device_status $device; then
net_log $"Device '$device' enabling didn't work" err $fn
@@ -604,7 +606,7 @@ ipv6_add_tunnel_device() {
return 3
fi
- /sbin/ip link set $device up
+ set_link_up $device
if ! ipv6_test_device_status $device; then
net_log $"Tunnel device '$device' bringing up didn't work" err $fn