diff options
author | Robert Bays <robert@vyatta.com> | 2013-06-09 14:13:22 -0700 |
---|---|---|
committer | Robert Bays <robert@vyatta.com> | 2013-06-09 14:13:22 -0700 |
commit | 370986bf089cb61928341d991b5896f692e2fdc7 (patch) | |
tree | b319fdcad0184d387e93a765dc856509f8b2d264 | |
parent | e0feba1bb0851d80388c085e7e4c45da84f55f74 (diff) | |
download | vyatta-cfg-quagga-370986bf089cb61928341d991b5896f692e2fdc7.tar.gz vyatta-cfg-quagga-370986bf089cb61928341d991b5896f692e2fdc7.zip |
make quagga link-detect command conditional on zebra
-rwxr-xr-x | scripts/vyatta-link-detect | 12 |
1 files 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 |