diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-09 18:02:24 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-09 18:02:24 -0700 |
commit | 4630f414eccc37ba621a6f3d2e22b632072c85f0 (patch) | |
tree | 1588bff835b658e599c906518528adace7bd65ba /scripts | |
parent | aff955e6de3ccc0dd85acebeb970e88a05e68f26 (diff) | |
download | vyatta-cfg-quagga-4630f414eccc37ba621a6f3d2e22b632072c85f0.tar.gz vyatta-cfg-quagga-4630f414eccc37ba621a6f3d2e22b632072c85f0.zip |
Revert "Use net_set to avoid using sudo"
This reverts commit 60fb7bb1025d25606efc00b4f3f9505e17efe1e0.
net_set is not tested yet.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-link-detect | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/vyatta-link-detect b/scripts/vyatta-link-detect index 078053cc..9dc17e05 100755 --- a/scripts/vyatta-link-detect +++ b/scripts/vyatta-link-detect @@ -17,15 +17,16 @@ fi # 0 - always receive # 1 - ignore receive if admin_down # 2 - ignore receive if admin_down or link down -set_linkfilter () { - net_set /proc/sys/net/ipv4/conf/$1/link_filter=$2 +set-sysctl () { + sudo sh -c "echo $2 >/proc/sys/net/ipv4/conf/$1/link_filter" +# sudo sh -c "echo $2 >/proc/sys/net/ipv6/conf/$1/link_filter" } case $2 in -on) set_linkfilter $1 2 +on) set-sysctl $1 2 exec vtysh -c "configure terminal" -c "interface $1" \ -c "link-detect" ;; -off) set_linkfilter $1 1 +off) set-sysctl $1 1 exec vtysh -c "configure terminal" -c "interface $1" \ -c "no link-detect" ;; *) usage;; |