From bfa703e183bbbb753b760bd2e59e9576f7ebea0d Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 4 Feb 2020 22:28:32 -0800 Subject: [PATCH] When applying a virtual interface in it's parent's file, use ifup on the parent --- net/redhat-linux-lib.pl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/net/redhat-linux-lib.pl b/net/redhat-linux-lib.pl index 65f723ce6..8a3307bbd 100755 --- a/net/redhat-linux-lib.pl +++ b/net/redhat-linux-lib.pl @@ -259,6 +259,7 @@ if ($pmode) { delete($conf{'NETMASK'.$n}); &write_env_file($file, \%conf); &unlock_file($file); + $b->{'parent'} ||= $b->{'name'}; } else { # Interface has it's own file @@ -879,10 +880,20 @@ else { sub apply_interface { my ($i) = @_; -local $out = &backquote_logged( - "cd / ; ". - "ifdown ".quotemeta($i->{'fullname'})." >/dev/null 2>&1 {'fullname'})." 2>&1 {'parent'} && $i->{'virtual'} ne '') { + $out = &backquote_logged( + "cd / ; ". + "ifup ".quotemeta($i->{'name'})." 2>&1 {'fullname'}). + " >/dev/null 2>&1 {'fullname'}). + " 2>&1