summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bays <robert@vyatta.com>2013-06-09 14:13:22 -0700
committerRobert Bays <robert@vyatta.com>2013-06-09 14:13:22 -0700
commit370986bf089cb61928341d991b5896f692e2fdc7 (patch)
treeb319fdcad0184d387e93a765dc856509f8b2d264
parente0feba1bb0851d80388c085e7e4c45da84f55f74 (diff)
downloadvyatta-cfg-quagga-370986bf089cb61928341d991b5896f692e2fdc7.tar.gz
vyatta-cfg-quagga-370986bf089cb61928341d991b5896f692e2fdc7.zip
make quagga link-detect command conditional on zebra
-rwxr-xr-xscripts/vyatta-link-detect12
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