diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vyatta-vtysh.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/vyatta-vtysh.pl b/scripts/vyatta-vtysh.pl index 3c291a34..c1101b6d 100644 --- a/scripts/vyatta-vtysh.pl +++ b/scripts/vyatta-vtysh.pl @@ -30,7 +30,14 @@ use warnings; use strict; use POSIX; -my $vtysh = '/usr/bin/vtysh'; +my $vtysh; + +if ( -x '/usr/bin/vyatta-vtysh' && -S '/var/run/vyatta/quagga/zebra.vty' ) { + $vtysh = '/usr/bin/vyatta-vtysh'; +} else { + $vtysh = '/usr/bin/vtysh'; +} + my $logfile = '/tmp/vtysh.log'; my $ignore_error = 0; |