summaryrefslogtreecommitdiffstats
path: root/bin/control_rancid.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/control_rancid.in')
-rwxr-xr-xbin/control_rancid.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/control_rancid.in b/bin/control_rancid.in
index 58f6211..c61a0a4 100755
--- a/bin/control_rancid.in
+++ b/bin/control_rancid.in
@@ -76,8 +76,8 @@ grep -v '^#' router.db > routers.db
cut -d: -f1,2 routers.db | sort -u > routers.all.new
if [ ! -f routers.all ] ; then touch routers.all; fi
diff routers.all routers.all.new > /dev/null 2>&1; RALL=$?
-@PERLV@ -F: -ane '{($F[0] =~ tr@A-Z@a-z@,print "$F[0]:$F[1]\n")
- if ($F[2] =~ /^down$/i);}' routers.db | sort -u > routers.down.new
+@PERLV@ -F: -ane '{($F[0] =~ tr@A-Z@a-z@,print join(":", @F)."\n")
+ if ($F[2] !~ /^up$/i);}' routers.db | sort -u > routers.down.new
if [ ! -f routers.down ] ; then touch routers.down; fi
diff routers.down routers.down.new > /dev/null 2>&1; RDOWN=$?
@PERLV@ -F: -ane '{($F[0] =~ tr@A-Z@a-z@,print "$F[0]:$F[1]\n")