From 378e5d0a9b2df4eb580424254f4cfdcb6dc2fa53 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Sun, 6 Jul 2025 11:24:51 -0600 Subject: [PATCH] asn: fix missing quiet checks in xt_asn_build Conceivably someone might want to run a refresh of the ASN database from within a script, particularly an unattended script such as a cron job. Do not generate summary output in that case. Signed-off-by: Philip Prindeville --- asn/xt_asn_build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asn/xt_asn_build b/asn/xt_asn_build index 63019ca..81c4965 100755 --- a/asn/xt_asn_build +++ b/asn/xt_asn_build @@ -12,6 +12,7 @@ use Socket qw(AF_INET AF_INET6 inet_pton); use warnings; use Text::CSV_XS; # or trade for Text::CSV use strict; +$| = 1; my $csv = Text::CSV_XS->new({ allow_whitespace => 1, @@ -189,7 +190,7 @@ sub writeASN printf "%5u IPv%s ranges for %s\n", scalar(@ranges), ($family == AF_INET ? '4' : '6'), - $asn_number; + $asn_number unless ($quiet); my $file = "$target_dir/".$asn_number.".iv".($family == AF_INET ? '4' : '6'); if (!open($fh, '>', $file)) { -- 2.47.3