netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Prindeville <philipp_subx@redfish-solutions.com>
To: Jan Engelhardt <jengelh@inai.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] xtables-addons: geoip: update scripts for DBIP names, etc.
Date: Tue, 12 May 2020 17:50:14 -0600	[thread overview]
Message-ID: <88C53F2F-CC3A-4E2C-806A-8C751953C328@redfish-solutions.com> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2005122250300.12285@n3.vanv.qr>



> On May 12, 2020, at 2:50 PM, Jan Engelhardt <jengelh@inai.de> wrote:
> 
> 
> On Tuesday 2020-05-12 18:51, Philip Prindeville wrote:
>>>> Also change the default destination directory to /usr/share/xt_geoip
>>>> as most distros use this now.  Update the documentation.
>>> 
>>> Maybe there are some "nicer" approaches? I'm calling for further inspirations.
>> 
>> I’m open to suggestions.
> 
> This has been floating around my mind.


Problem with this change is that "-D foo -s” and “-s -D foo” have different semantics… Should probably make the two options mutually exclusive.

-Philip

> 
> geoip/xt_geoip_build   | 1 +
> geoip/xt_geoip_build.1 | 8 ++++++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/geoip/xt_geoip_build b/geoip/xt_geoip_build
> index 750bf98..7bafa5f 100755
> --- a/geoip/xt_geoip_build
> +++ b/geoip/xt_geoip_build
> @@ -24,6 +24,7 @@ my $target_dir = ".";
> &GetOptions(
> 	"D=s" => \$target_dir,
> 	"i=s" => \$input_file,
> +	"s" => sub { $target_dir = "/usr/share/xt_geoip"; },
> );
> 
> if (!-d $target_dir) {
> diff --git a/geoip/xt_geoip_build.1 b/geoip/xt_geoip_build.1
> index ac3e6d3..598177f 100644
> --- a/geoip/xt_geoip_build.1
> +++ b/geoip/xt_geoip_build.1
> @@ -27,11 +27,15 @@ Specifies the target directory into which the files are to be put. Defaults to "
> \fB\-i\fP \fIinput_file\fP
> Specifies the source location of the DBIP CSV file. Defaults to
> "dbip-country-lite.csv". Use "-" to read from stdin.
> +.TP
> +\fB\-s\fP
> +"System mode". Equivalent to \fB\-D /usr/share/xt_geoip\fP.
> .SH Application
> .PP
> -Shell commands to build the databases and put them to where they are expected:
> +Shell commands to build the databases and put them to where they are expected
> +(usually run as root):
> .PP
> -xt_geoip_build \-D /usr/share/xt_geoip
> +xt_geoip_build \-s
> .SH See also
> .PP
> xt_geoip_dl(1)
> -- 
> 2.26.2
> 


      reply	other threads:[~2020-05-12 23:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  0:27 [PATCH v1 1/1] xtables-addons: geoip: update scripts for DBIP names, etc Philip Prindeville
2020-05-12  9:30 ` Jan Engelhardt
2020-05-12 16:51   ` Philip Prindeville
2020-05-12 20:50     ` Jan Engelhardt
2020-05-12 23:50       ` Philip Prindeville [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88C53F2F-CC3A-4E2C-806A-8C751953C328@redfish-solutions.com \
    --to=philipp_subx@redfish-solutions.com \
    --cc=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).