summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-04-11 13:29:58 -0700
committerJohn Southworth <john.southworth@vyatta.com>2012-04-11 13:29:58 -0700
commit397058ed63445b1a8e2d734eef8a38173fe75347 (patch)
tree73995d71ebc47004e27f8c6acaf3345c75f63b08
parentd03721ce6e2a277c2992afb1392912beb8ac368d (diff)
parentdf76a73c764180ca6793f647ccc9e4a32a197b87 (diff)
downloadvyatta-op-397058ed63445b1a8e2d734eef8a38173fe75347.tar.gz
vyatta-op-397058ed63445b1a8e2d734eef8a38173fe75347.zip
Merge branch 'pacifica' of git.vyatta.com:/git/vyatta-op into pacifica
-rw-r--r--debian/changelog16
-rwxr-xr-xscripts/vyatta-boot-image.pl2
-rwxr-xr-xscripts/vyatta-show-interfaces.pl12
3 files changed, 21 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog
index 6d5ea46..c76b99a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+vyatta-op (0.13.251) unstable; urgency=low
+
+ * Use Interface.pm to find interface state
+
+ -- Stephen Hemminger <shemminger@vyatta.com> Tue, 10 Apr 2012 18:30:35 -0700
+
+vyatta-op (0.13.250) unstable; urgency=low
+
+ [ Stephen Hemminger ]
+ * Better perl style in boot image
+
+ [ Deepti Kulkarni ]
+ * fix to use the correct perl function
+
+ -- Deepti Kulkarni <deepti@vyatta.com> Tue, 10 Apr 2012 09:53:16 -0700
+
vyatta-op (0.13.249) unstable; urgency=low
* Make ping feel like all the other system commands
diff --git a/scripts/vyatta-boot-image.pl b/scripts/vyatta-boot-image.pl
index 19df5a2..555496b 100755
--- a/scripts/vyatta-boot-image.pl
+++ b/scripts/vyatta-boot-image.pl
@@ -192,7 +192,7 @@ sub deleteGrubEntries {
die "Failed to modify GRUB configuration\n"
if (!defined($p) || !chmod(($p & oct(7777)), $tfile));
- mv($tfile, $grub_cfg)
+ move($tfile, $grub_cfg)
or die "Failed to delete GRUB entries\n";
}
diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl
index 5a56050..36428cb 100755
--- a/scripts/vyatta-show-interfaces.pl
+++ b/scripts/vyatta-show-interfaces.pl
@@ -119,18 +119,14 @@ sub get_ipaddr {
}
sub get_state_link {
- my $intf = shift;
+ my $name = shift;
+ my $intf = new Vyatta::Interface($name);
my $state;
my $link = 'down';
- my $flags = get_sysfs_value($intf, 'flags');
- my $hex_flags = hex($flags);
- if ($hex_flags & 0x1) { # IFF_UP
+ if ($intf->up()) {
$state = 'up';
- my $carrier = get_sysfs_value($intf, 'carrier');
- if ($carrier eq '1') {
- $link = "up";
- }
+ $link = "up" if ($intf->running());
} else {
$state = "admin down";
}