packages/net/noddos/patches/030-getnoddosdeviceprofiles-wget-timestamping-check.patch
Eneas U de Queiroz ca4590ccdf
noddos: add libipset-7, uclient-fetch compatiblity
Old API compatibility was kept with a compatiblity shim.

Detect wget --timestamping support to make it compatible with
uclient-fetch implementation of wget.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
2019-04-22 16:54:02 -03:00

28 lines
966 B
Diff

From eb1730afff9377a5f167d0738ad0b3aeba9634d0 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Tue, 19 Mar 2019 18:27:10 -0300
Subject: [PATCH] getnoddosdeviceprofiles: wget timestamping check
Check if the --timestamping option is available to avoid an error in
openwrt when wget is handled by uclient-fetch.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/tools/getnoddosdeviceprofiles b/tools/getnoddosdeviceprofiles
index 337e351..174034f 100755
--- a/tools/getnoddosdeviceprofiles
+++ b/tools/getnoddosdeviceprofiles
@@ -86,7 +86,12 @@ fi
# That's also why we don't delete the downloaded file
if [ "$WGET" != "" ]
then
- GETURL="$WGET --quiet --timestamping"
+ GETURL="$WGET --quiet"
+ # Make sure wget accepts --timestamping
+ if wget --help 2>&1 | egrep timestamping > /dev/null
+ then
+ GETURL="$GETURL --timestamping"
+ fi
else
if [ "$CURL" != "" ]
then