diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2008-01-04 15:38:03 -0800 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2008-01-04 15:38:03 -0800 |
commit | 2f63b8af6d06eb930cff4b13bb0d4c782f47d8b2 (patch) | |
tree | 6e4639a250757396cee2fe3cc266da198cecc071 /etc | |
parent | c0936f2db61418d29082e0cb6ff988226c479575 (diff) | |
download | vyatta-op-2f63b8af6d06eb930cff4b13bb0d4c782f47d8b2.tar.gz vyatta-op-2f63b8af6d06eb930cff4b13bb0d4c782f47d8b2.zip |
use vtysh wrapper function to detect vyatta-quagga vs debian/ubuntu-quagga
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash_completion.d/10vyatta-op | 12 |
1 files 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 |