diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-03 10:04:57 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-03 10:04:57 -0800 |
commit | a56183367fbbbacaf0cd85a001772e0740c50783 (patch) | |
tree | 3ec243f3b1208cafe768d105cfd733f5f176f97a /scripts/vyatta-link-detect | |
parent | ea203872157e4b025f92999fe0c172df86ca0e55 (diff) | |
download | vyatta-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-x | scripts/vyatta-link-detect | 21 |
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" |