From a56183367fbbbacaf0cd85a001772e0740c50783 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 3 Dec 2008 10:04:57 -0800 Subject: Add new script to wrap changes to link-detect --- scripts/vyatta-link-detect | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/vyatta-link-detect 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" -- cgit v1.2.3