From 1d237439676e8b9ee10a6dde2c64f5ba3a057210 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 3 Jun 2020 17:21:31 +0000 Subject: [PATCH] Rename location-query(8) to location(8) Signed-off-by: Michael Tremer --- .gitignore | 3 +-- Makefile.am | 14 +++++------ man/{location-query.txt => location.txt} | 24 +++++++++---------- src/python/{location-query.in => location.in} | 2 +- src/systemd/location-update.service.in | 2 +- 5 files changed, 22 insertions(+), 23 deletions(-) rename man/{location-query.txt => location.txt} (84%) rename src/python/{location-query.in => location.in} (99%) diff --git a/.gitignore b/.gitignore index cadcc68..6ab8e91 100644 --- a/.gitignore +++ b/.gitignore @@ -14,10 +14,9 @@ Makefile.in /configure /libtool /stamp-h1 -/src/python/location-downloader +/src/python/location /src/python/location-exporter /src/python/location-importer -/src/python/location-query /src/systemd/location-update.service /src/systemd/location-update.timer /test.db diff --git a/Makefile.am b/Makefile.am index bf204d8..59870b1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -238,19 +238,19 @@ uninstall-perl: $(DESTDIR)/$(prefix)/man/man3/Location.3pm bin_SCRIPTS = \ + src/python/location \ src/python/location-exporter \ - src/python/location-importer \ - src/python/location-query + src/python/location-importer EXTRA_DIST += \ + src/python/location.in \ src/python/location-exporter.in \ - src/python/location-importer.in \ - src/python/location-query.in + src/python/location-importer.in CLEANFILES += \ + src/python/location \ src/python/location-exporter \ - src/python/location-importer \ - src/python/location-query + src/python/location-importer # ------------------------------------------------------------------------------ @@ -374,7 +374,7 @@ src_test_signature_LDADD = \ # ------------------------------------------------------------------------------ MANPAGES = \ - man/location-query.8 + man/location.8 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES)) MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT)) diff --git a/man/location-query.txt b/man/location.txt similarity index 84% rename from man/location-query.txt rename to man/location.txt index acb43cd..672c2b2 100644 --- a/man/location-query.txt +++ b/man/location.txt @@ -1,21 +1,21 @@ -= location-query(8) += location(8) == NAME -location-query - Query the location database +location - Query the location database == SYNOPSIS [verse] -`location-query lookup ADDRESS [ADDRESS...]` -`location-query get-as ASN [ASN...]` -`location-query search-as STRING` -`location-query update` -`location-query verify` -`location-query list-networks-by-as ASN` -`location-query list-networks-by-cc COUNTRY_CODE` -`location-query list-networks-by-flags [--anonymous-proxy|--satellite-provider|--anycast]` +`location lookup ADDRESS [ADDRESS...]` +`location get-as ASN [ASN...]` +`location search-as STRING` +`location update` +`location verify` +`location list-networks-by-as ASN` +`location list-networks-by-cc COUNTRY_CODE` +`location list-networks-by-flags [--anonymous-proxy|--satellite-provider|--anycast]` == DESCRIPTION -The `location-query` retrieves information from the location database. +`location` retrieves information from the location database. This data can be used to determine someone's location on the Internet and for building firewall rulesets to block access from certain ASes or countries. @@ -93,7 +93,7 @@ or countries. Shows the program's version and exists. == EXIT CODES -The 'location-query' command will normally exit with code zero. +The 'location' command will normally exit with code zero. If there has been a problem and the requested action could not be performed, the exit code is unequal to zero. diff --git a/src/python/location-query.in b/src/python/location.in similarity index 99% rename from src/python/location-query.in rename to src/python/location.in index 0291786..10618e2 100644 --- a/src/python/location-query.in +++ b/src/python/location.in @@ -248,7 +248,7 @@ class CLI(object): try: db = location.Database(args.database) except FileNotFoundError as e: - sys.stderr.write("location-query: Could not open database %s: %s\n" \ + sys.stderr.write("location: Could not open database %s: %s\n" \ % (args.database, e)) sys.exit(1) diff --git a/src/systemd/location-update.service.in b/src/systemd/location-update.service.in index c4584af..daae2c5 100644 --- a/src/systemd/location-update.service.in +++ b/src/systemd/location-update.service.in @@ -4,4 +4,4 @@ Requires=network.target [Service] Type=oneshot -ExecStart=@bindir@/location-query update +ExecStart=@bindir@/location update -- 2.39.2