diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-26 10:58:51 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-26 10:58:51 -0700 |
commit | 492a1b10e5921d3814eb9ef9a741899ffb6f0a6c (patch) | |
tree | 0928ce2e09b73d7ad799ce78e49089e70787a90d | |
parent | 6c647cde4aa18d39c9a9cfb643b5f81bfc5a7c21 (diff) | |
parent | be583e255cfcc787944ebf9a9a73bda7a8e064f3 (diff) | |
download | vyatta-cfg-quagga-492a1b10e5921d3814eb9ef9a741899ffb6f0a6c.tar.gz vyatta-cfg-quagga-492a1b10e5921d3814eb9ef9a741899ffb6f0a6c.zip |
Merge branch 'glendale' into hollywood
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | scripts/vyatta-linkstatus.pl | 97 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/disable-link-detect/node.def | 7 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def | 6 |
4 files changed, 4 insertions, 107 deletions
diff --git a/Makefile.am b/Makefile.am index 3f4f0328..82880874 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,6 @@ sbin_SCRIPTS += scripts/policy/vyatta-policy.pl sbin_SCRIPTS += scripts/vyatta_quagga_utils.pl sbin_SCRIPTS += scripts/policy/vyatta-check-as-prepend.pl sbin_SCRIPTS += scripts/vyatta-vtysh.pl -sbin_SCRIPTS += scripts/vyatta-linkstatus.pl sbin_SCRIPTS += scripts/vyatta-policy-action-verify.pl cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \ diff --git a/scripts/vyatta-linkstatus.pl b/scripts/vyatta-linkstatus.pl deleted file mode 100644 index a1381850..00000000 --- a/scripts/vyatta-linkstatus.pl +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/perl -w -# -# Module: vyatta-linkstatus.pl -# -# **** License **** -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2008 Vyatta, Inc. -# All Rights Reserved. -# -# Author: Michael Larson -# Date: January 2008 -# Description: Writes exclusion list for linkstatus -# -# **** End License **** -# - -use warnings; -use strict; -use POSIX; -use File::Copy; - -my $exclude_file = '/var/linkstatus/exclude'; -my $exclude_lck_file = '/var/linkstatus/exclude.lck'; -my $action = 0; -my $iface; - - -foreach my $arg (@ARGV) { - if (substr($arg, 0, 5) eq "--add") { - $action = 0; - next; - } - elsif (substr($arg, 0, 5) eq "--del") { - $action = 1; - next; - } - else { - #must be interface then... - $iface = $arg; - } -} - -open FILE, "<$exclude_file"; -open FILE_LCK, "+>$exclude_lck_file"; -my $newline = ""; -my @excl; - -while (<FILE>) { - @excl = split ',', $_; - - foreach my $elem (@excl) - { - if ($elem ne $iface) { - if ($newline ne '') { - $newline = "$newline,$elem"; - } - else { - $newline = $elem; - } - } - } -} - -close FILE; - -#if add new now add to end of list -if ($action==0) { - if ($newline ne '') { - $newline = "$newline,$iface"; - } - else { - $newline = $iface; - } -} - -print FILE_LCK "$newline"; -close FILE_LCK; - -copy ($exclude_lck_file,$exclude_file); -unlink($exclude_lck_file); - - -#finally kick the process -if (open(PID, "< /var/run/vyatta/quagga/watchlink.pid")) { - my $foo = <PID>; - system "kill -10 $foo"; - close(PID); -} diff --git a/templates/interfaces/ethernet/node.tag/disable-link-detect/node.def b/templates/interfaces/ethernet/node.tag/disable-link-detect/node.def index d1482bbc..7cc1de37 100644 --- a/templates/interfaces/ethernet/node.tag/disable-link-detect/node.def +++ b/templates/interfaces/ethernet/node.tag/disable-link-detect/node.def @@ -1,9 +1,6 @@ help: Set to ignore link state changes on this interface update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"interface $VAR(../@)\" \ - -c \"no link-detect\" \ - && ${vyatta_sbindir}/vyatta-linkstatus.pl --add $VAR(../@) 2>/dev/null" - + -c \"no link-detect\" delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"interface $VAR(../@)\" \ - -c \"link-detect \" \ - && ${vyatta_sbindir}/vyatta-linkstatus.pl --del $VAR(../@) 2>/dev/null" + -c \"link-detect \" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def index 65ced0e2..64a9b06a 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable-link-detect/node.def @@ -1,9 +1,7 @@ help: Set to ignore link state changes on this interface update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"interface $VAR(../../@).$VAR(../@)\" \ - -c \"no link-detect\" \ - && ${vyatta_sbindir}/vyatta-linkstatus.pl --add $VAR(../../@).$VAR(../@) 2>/dev/null" + -c \"no link-detect\" delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"interface $VAR(../../@).$VAR(../@)\" \ - -c \"link-detect \" \ - && ${vyatta_sbindir}/vyatta-linkstatus.pl --del $VAR(../../@).$VAR(../@) 2>/dev/null" + -c \"link-detect\" |