diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-28 10:27:17 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-28 10:27:17 -0700 |
commit | ac3a679d68fab97b0e261445a3bf926993119cdd (patch) | |
tree | c5e655152257ca88700cc719f9b1fe1b3ba7a8dc | |
parent | c0f296ee3c3e8950c432c8256aebade21a297224 (diff) | |
download | vyatta-cfg-ac3a679d68fab97b0e261445a3bf926993119cdd.tar.gz vyatta-cfg-ac3a679d68fab97b0e261445a3bf926993119cdd.zip |
Need to convert path to have slashes
More convient to do it here.
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index 757e29f..2310e77 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -85,7 +85,7 @@ op_dhcp_command($op_dhclient, $dev) if ($op_dhclient); is_valid_name($check_name, $dev) if ($check_name); exists_name($dev) if ($warn_name); show_interfaces($show_names) if ($show_names); -show_config_level($dev) if ($show_path); +show_config_path($dev) if ($show_path); exit 0; sub is_ip_configured { @@ -484,12 +484,14 @@ sub show_interfaces { print join(' ', @match), "\n"; } -sub show_config_level { +sub show_config_path { my $name = shift; + die "Missing --dev argument\n" unless $name; my $intf = new Vyatta::Interface($name); die "$name does not match any known interface name type\n" unless $intf; - - print $intf->path(), "\n"; + my $level = $intf->path(); + $level =~ s/ /\//g; + print "/opt/vyatta/config/active/$level\n"; } |