summaryrefslogtreecommitdiff
path: root/scripts/vyatta-link-detect
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-03 10:04:57 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-03 10:04:57 -0800
commita56183367fbbbacaf0cd85a001772e0740c50783 (patch)
tree3ec243f3b1208cafe768d105cfd733f5f176f97a /scripts/vyatta-link-detect
parentea203872157e4b025f92999fe0c172df86ca0e55 (diff)
downloadvyatta-cfg-quagga-a56183367fbbbacaf0cd85a001772e0740c50783.tar.gz
vyatta-cfg-quagga-a56183367fbbbacaf0cd85a001772e0740c50783.zip
Add new script to wrap changes to link-detect
Diffstat (limited to 'scripts/vyatta-link-detect')
-rwxr-xr-xscripts/vyatta-link-detect21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/vyatta-link-detect b/scripts/vyatta-link-detect
new file mode 100755
index 00000000..8981d7f4
--- /dev/null
+++ b/scripts/vyatta-link-detect
@@ -0,0 +1,21 @@
+#! /bin/bash
+#
+# Usage: vyatta-link-detect devicename on|off
+#
+
+usage() {
+ echo "Usage: $0 devicename {on|off}"
+ exit 1
+}
+
+if [ $# -ne 2 ]; then
+ usage
+fi
+
+case $2 in
+on) cmd="link-detect" ;;
+off) cmd="no link-detect" ;;
+*) usage;;
+esac
+
+exec vyatta-vtysh -c "configure terminal" -c "interface $1" -c "$cmd"