summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-11-21 17:06:35 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-11-21 17:06:35 -0800
commit2193c5b5563981401df3885665e6d146b6f0047a (patch)
treedf63fb867b80813b2a4002346d7322579264ecb8
parent10ebe0dbf9e7a01c2dc93253a0d2bafe788b8fa9 (diff)
downloadvyatta-op-2193c5b5563981401df3885665e6d146b6f0047a.tar.gz
vyatta-op-2193c5b5563981401df3885665e6d146b6f0047a.zip
Convert to Vyatta::
-rw-r--r--scripts/vyatta-op-dns-forwarding.pl4
-rw-r--r--scripts/vyatta-op-dynamic-dns.pl4
-rwxr-xr-xscripts/vyatta-show-interfaces.pl12
3 files changed, 10 insertions, 10 deletions
diff --git a/scripts/vyatta-op-dns-forwarding.pl b/scripts/vyatta-op-dns-forwarding.pl
index bac1df3..5209e3e 100644
--- a/scripts/vyatta-op-dns-forwarding.pl
+++ b/scripts/vyatta-op-dns-forwarding.pl
@@ -25,7 +25,7 @@
use lib "/opt/vyatta/share/perl5/";
use Getopt::Long;
-use VyattaConfig;
+use Vyatta::Config;
use strict;
use warnings;
@@ -89,7 +89,7 @@ sub print_stats {
}
sub get_dns_nameservers {
- my $vyatta_config = new VyattaConfig;
+ my $vyatta_config = new Vyatta::Config;
$vyatta_config->setLevel("service dns forwarding");
$vyatta_config->{_active_dir_base} = "/opt/vyatta/config/active/";
diff --git a/scripts/vyatta-op-dynamic-dns.pl b/scripts/vyatta-op-dynamic-dns.pl
index 66e7b73..d1197c2 100644
--- a/scripts/vyatta-op-dynamic-dns.pl
+++ b/scripts/vyatta-op-dynamic-dns.pl
@@ -25,7 +25,7 @@
use lib "/opt/vyatta/share/perl5/";
use Getopt::Long;
-use VyattaConfig;
+use Vyatta::Config;
use strict;
use warnings;
@@ -79,7 +79,7 @@ sub print_ddns_stats {
sub get_ddns_interfaces {
- my $vyatta_config = new VyattaConfig;
+ my $vyatta_config = new Vyatta::Config;
$vyatta_config->setLevel("service dns dynamic");
$vyatta_config->{_active_dir_base} = "/opt/vyatta/config/active/";
my @ddns_interfaces = $vyatta_config->listOrigNodes("interface");
diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl
index f006d0f..988b0b5 100755
--- a/scripts/vyatta-show-interfaces.pl
+++ b/scripts/vyatta-show-interfaces.pl
@@ -24,8 +24,8 @@
#
use lib "/opt/vyatta/share/perl5/";
-use VyattaConfig;
-use VyattaMisc;
+use Vyatta::Config;
+use Vyatta::Misc;
use Getopt::Long;
use POSIX;
use NetAddr::IP;
@@ -94,7 +94,7 @@ sub get_intf_description {
if (!defined $intf_type) {
return "";
}
- my $config = new VyattaConfig;
+ my $config = new Vyatta::Config;
my $path;
if ($intf =~ m/([a-zA-Z]+\d+)\.(\d+)/) {
$path = "interfaces $intf_type $1 vif $2";
@@ -115,7 +115,7 @@ sub get_intf_stats {
my %stats = ();
foreach my $var (@rx_stat_vars, @tx_stat_vars) {
- $stats{$var} = VyattaMisc::get_sysfs_value($intf, "statistics/$var");
+ $stats{$var} = Vyatta::Misc::get_sysfs_value($intf, "statistics/$var");
}
return %stats;
}
@@ -178,12 +178,12 @@ sub get_state_link {
my $intf = shift;
my $state;
my $link = 'down';
- my $flags = VyattaMisc::get_sysfs_value($intf, 'flags');
+ my $flags = Vyatta::Misc::get_sysfs_value($intf, 'flags');
my $hex_flags = hex($flags);
if ($hex_flags & 0x1) { # IFF_UP
$state = 'up';
- my $carrier = VyattaMisc::get_sysfs_value($intf, 'carrier');
+ my $carrier = Vyatta::Misc::get_sysfs_value($intf, 'carrier');
if ($carrier eq '1') {
$link = "up";
}