diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Keepalived.pm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm index 96d4fe9..c34d277 100755 --- a/lib/Vyatta/Keepalived.pm +++ b/lib/Vyatta/Keepalived.pm @@ -153,10 +153,18 @@ sub vrrp_get_config { my $path; my $config = new Vyatta::Config; - if ($intf =~ m/(eth\d+)\.(\d+)/) { - $path = "interfaces ethernet $1 vif $2"; + if ($intf =~ m/bond/) { + if ($intf =~ m/(bond\d+)\.(\d+)/) { + $path = "interfaces bonding $1 vif $2"; + } else { + $path = "interfaces bonding $intf"; + } } else { - $path = "interfaces ethernet $intf"; + if ($intf =~ m/(eth\d+)\.(\d+)/) { + $path = "interfaces ethernet $1 vif $2"; + } else { + $path = "interfaces ethernet $intf"; + } } $config->setLevel($path); |