summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-04-01 15:10:17 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-04-01 15:10:17 -0700
commit474ed5bf42f1a5a715e5ae7c0d7c4e504977305f (patch)
treea56f26e42d30d4cfd6bd4f756d649e67d2aa4d4d
parent8a4f104c2156afb3856ae0c82cc0006679a4ef3d (diff)
parentf1a11d245a3295aa1dd950c7c8deb00ceaa62a3d (diff)
downloadvyatta-cfg-474ed5bf42f1a5a715e5ae7c0d7c4e504977305f.tar.gz
vyatta-cfg-474ed5bf42f1a5a715e5ae7c0d7c4e504977305f.zip
Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg into jenner
-rw-r--r--debian/changelog11
-rwxr-xr-xscripts/vyatta-interfaces.pl14
2 files changed, 24 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 17fd940..22709df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+vyatta-cfg (0.14.55) unstable; urgency=low
+
+ [ Stig Thormodsrud ]
+ * Change rank value such that tunnels get created before "protocols
+ rip interface".
+
+ [ Stephen Hemminger ]
+ * Add --warn option for vyatta-interfaces
+
+ -- Stephen Hemminger <stephen.hemminger@vyatta.com> Wed, 01 Apr 2009 12:25:44 -0700
+
vyatta-cfg (0.14.54) unstable; urgency=low
[ slioch ]
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 4820ae3..d647e96 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -46,10 +46,11 @@ use warnings;
my $dhcp_daemon = '/sbin/dhclient';
my ($eth_update, $eth_delete, $addr, $dev, $mac, $mac_update, $op_dhclient);
-my ($check_name, $show_names, $intf_cli_path, $vif_name);
+my ($check_name, $show_names, $intf_cli_path, $vif_name, $warn_name);
sub usage() {
print "Usage: $0 --dev=<interface> --check=<type>\n";
+ print " $0 --dev=<interface> --warn\n";
print " $0 --dev=<interface> --valid-mac=<aa:aa:aa:aa:aa:aa>\n";
print " $0 --dev=<interface> --eth-addr-update=<aa:aa:aa:aa:aa:aa>\n";
print " $0 --dev=<interface> --eth-addr-delete=<aa:aa:aa:aa:aa:aa>\n";
@@ -68,6 +69,7 @@ GetOptions("eth-addr-update=s" => \$eth_update,
"check=s" => \$check_name,
"show=s" => \$show_names,
"vif=s" => \$vif_name,
+ "warn", => \$warn_name,
) or usage();
if ($eth_update) { update_eth_addrs($eth_update, $dev); }
@@ -77,6 +79,7 @@ if ($mac) { is_valid_mac($mac, $dev); }
if ($mac_update) { update_mac($mac_update, $dev); }
if ($op_dhclient) { op_dhcp_command($op_dhclient, $dev); }
if ($check_name) { is_valid_name($check_name, $dev); }
+if ($warn_name) { exists_name($dev); }
if ($show_names) { show_interfaces($show_names); }
sub is_ip_configured {
@@ -450,6 +453,15 @@ sub is_valid_name {
exit 0;
}
+sub exists_name {
+ my $name = shift;
+ die "Missing --dev argument\n" unless $name;
+
+ warn "interface $name does not exist on system\n"
+ unless grep { $name eq $_ } getInterfaces();
+ exit 0;
+}
+
# generate one line with all known interfaces (for allowed)
sub show_interfaces {
my $type = shift;