From 2f63b8af6d06eb930cff4b13bb0d4c782f47d8b2 Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Fri, 4 Jan 2008 15:38:03 -0800 Subject: use vtysh wrapper function to detect vyatta-quagga vs debian/ubuntu-quagga --- etc/bash_completion.d/10vyatta-op | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index 7019681..3d144a6 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -411,8 +411,16 @@ unset nullglob_save _vyatta_op_init $@ -type vyatta-vtysh &>/dev/null && \ - alias vtysh=vyatta-vtysh +vtysh () +{ + if [ -S /var/run/vyatta/quagga/zebra.vty ] ; then + vyatta-vtysh "$@" + elif [ ! -S /var/run/quagga/zebra.vty ] ; then + /usr/bin/vtysh "$@" + else + echo "Can't connect with zebra daemon" + fi +} ### Local Variables: ### mode: shell-script -- cgit v1.2.3