From 51416880802d0261a8a5eb6d753cc2231027887d Mon Sep 17 00:00:00 2001 From: "tgoff0@gmail.com" Date: Tue, 26 May 2015 17:34:13 +0000 Subject: [PATCH] gui: Tweak using vtysh by widgets. --- trunk/gui/widget.tcl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/trunk/gui/widget.tcl b/trunk/gui/widget.tcl index 051ea964..9ecf64ff 100644 --- a/trunk/gui/widget.tcl +++ b/trunk/gui/widget.tcl @@ -3,12 +3,15 @@ # See the LICENSE file included in this distribution. # -set vtysh [auto_execok vtysh] +set vtysh_cmd vtysh +set vtysh_search_path {/usr/bin /usr/local/bin /usr/lib/quagga} + +set vtysh [auto_execok $vtysh_cmd] if {$vtysh == ""} { - set vtysh_search_path {/usr/bin /usr/local/bin /usr/lib/quagga} + set vtysh $vtysh_cmd foreach p $vtysh_search_path { - if {[file executable $p/vtysh]} { - set vtysh $p/vtysh + if {[file executable $p/$vtysh_cmd]} { + set vtysh $p/$vtysh_cmd break } }