From 66eb0adacf0ae6238a31531d7ab8701ba842a16c Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Fri, 14 Nov 2008 18:06:25 -0800 Subject: rectify check for bond interface --- scripts/vyatta-interfaces.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/vyatta-interfaces.pl') diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index ad47614..b5d38af 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -130,7 +130,7 @@ sub is_dhcp_enabled { # FIXME: this is wrong and depends on name of interface -> type # which is not dependable - if ($intf =~ m/^eth/ || $intf =~ m/^bond/) { + if ($intf =~ m/^eth/) { if ($intf =~ m/(\w+)\.(\d+)/) { $config->setLevel("interfaces ethernet $1 vif $2"); } else { @@ -138,6 +138,8 @@ sub is_dhcp_enabled { } } elsif ($intf =~ m/^br/) { $config->setLevel("interfaces bridge $intf"); + } elsif ($intf =~ m/^bond/) { + $config->setLevel("interfaces bonding $intf"); } else { # # FIXME: currently we only support dhcp on ethernet -- cgit v1.2.3