From b1994cca7ed2d9db8b6006a7d9ae26f7fcbf44d5 Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Thu, 3 Jan 2008 18:17:05 -0800 Subject: work w/ either quagga (debian) or vyatta-quagga packages --- debian/control | 3 ++- scripts/vyatta-vtysh.pl | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 148bbe2a..88f72341 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,8 @@ Depends: bash (>= 3.1), perl (>= 5.8.8), procps (>= 1:3.2.7-3), coreutils (>= 5.97-5.3), - vyatta-cfg, quagga + vyatta-cfg, + vyatta-quagga | quagga Suggests: util-linux (>= 2.13-5), net-tools, ethtool, 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; -- cgit v1.2.3