]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
src: display default directory for file inclusion in -h/--help
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Jun 2017 10:24:52 +0000 (12:24 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Jun 2017 11:30:34 +0000 (13:30 +0200)
If no explicit relative or absolute path is enforced by the user, nft
relies on either -I/--includepath or the default include directory that
is set at compile time.

Given most of our users will rely on packaged versions of nft, provide a
way to display the location of this default includepath directory.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
doc/nft.xml
src/main.c

index f93baa03d7217fcee90fedd15d9c91d37eb76863..faf0ffde9e191e1c8f5c48e5fa6298b4ecf44f85 100644 (file)
@@ -212,6 +212,11 @@ vi:ts=4 sw=4
                                current working directory (ie. relative path) or / for file location expressed
                                as an absolute path.
                        </para>
+                       <para>
+                               If -I/--includepath is not specified, then nft relies on the default directory
+                               that is specified at compile time. You can retrieve this default directory via
+                               -h/--help option.
+                       </para>
                        <para>
                                If the <literal>filename</literal> parameter is a directory, then all files in
                                the directory are loaded in alphabetical order.
index 6dae817af40be174b4f8b2a871e7249621878db6..5089ff2448f3bed5594d345ff0109e86916a361f 100644 (file)
@@ -125,12 +125,12 @@ static void show_help(const char *name)
 "  -s, --stateless             Omit stateful information of ruleset.\n"
 "  -N                          Translate IP addresses to names.\n"
 "  -a, --handle                        Output rule handle.\n"
-"  -I, --includepath <directory>       Add <directory> to the paths searched for include files.\n"
+"  -I, --includepath <directory>       Add <directory> to the paths searched for include files. Default is: %s\n"
 #ifdef DEBUG
 "  --debug <level [,level...]> Specify debugging level (scanner, parser, eval, netlink, mnl, proto-ctx, segtree, all)\n"
 #endif
 "\n",
-       name);
+       name, DEFAULT_INCLUDE_PATH);
 }
 
 #ifdef DEBUG