From 7fbb45be082e3ef6a427ed68aa63fa81e46c9883 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 5 Jul 2017 13:56:44 -0300 Subject: [PATCH] Include User Agent information when update bogons list --- src/etc/rc.update_bogons.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/etc/rc.update_bogons.sh b/src/etc/rc.update_bogons.sh index bcb8654724..d8df393af8 100755 --- a/src/etc/rc.update_bogons.sh +++ b/src/etc/rc.update_bogons.sh @@ -23,6 +23,14 @@ # Global variables proc_error="" +do_not_send_uniqueid=$(/usr/local/sbin/read_xml_tag.sh boolean system/do_not_send_uniqueid) +if [ "${do_not_send_uniqueid}" != "true" ]; then + uniqueid=$(/usr/sbin/gnid) + export HTTP_USER_AGENT="${product}/${product_version}:${uniqueid}" +else + export HTTP_USER_AGENT="${product}/${product_version}" +fi + # Download and extract if necessary process_url() { local file=$1