diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-02 09:53:20 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-02 09:53:20 -0700 |
commit | efe4b345fa2fdf33b4e3f2946b0d835ef3f1fcef (patch) | |
tree | 74511d04cfc607e4780e6ab727269d6dc21fdea2 /scripts/vyatta-interfaces.pl | |
parent | c5c081bb058bf399fab9b16dccb3111968617b6a (diff) | |
download | vyatta-cfg-system-efe4b345fa2fdf33b4e3f2946b0d835ef3f1fcef.tar.gz vyatta-cfg-system-efe4b345fa2fdf33b4e3f2946b0d835ef3f1fcef.zip |
Fail gracefully if path is unknown
If device is ppp but not in Vyatta config, the configuration
path will be undefined. So have script give reasonable error
rather than perl undefined variable message.
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index cbb6abf6..5b7f2cee 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -537,6 +537,8 @@ sub show_config_path { die "$name does not match any known interface name type\n" unless $intf; my $level = $intf->path(); + die "$name does not have a known path\n" unless $level; + $level =~ s/ /\//g; print "/opt/vyatta/config/active/$level\n"; } |