From 370986bf089cb61928341d991b5896f692e2fdc7 Mon Sep 17 00:00:00 2001 From: Robert Bays Date: Sun, 9 Jun 2013 14:13:22 -0700 Subject: make quagga link-detect command conditional on zebra --- scripts/vyatta-link-detect | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/vyatta-link-detect b/scripts/vyatta-link-detect index 9dc17e05..ff3886e2 100755 --- a/scripts/vyatta-link-detect +++ b/scripts/vyatta-link-detect @@ -24,11 +24,15 @@ set-sysctl () { case $2 in on) set-sysctl $1 2 - exec vtysh -c "configure terminal" -c "interface $1" \ - -c "link-detect" ;; + if [ -f /usr/sbin/zebra ]; then + exec vtysh -c "configure terminal" -c "interface $1" \ + -c "link-detect" + fi ;; off) set-sysctl $1 1 - exec vtysh -c "configure terminal" -c "interface $1" \ - -c "no link-detect" ;; + if [ -f /usr/sbin/zebra ]; then + exec vtysh -c "configure terminal" -c "interface $1" \ + -c "no link-detect" + fi ;; *) usage;; esac # not reached -- cgit v1.2.3