summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in2
-rw-r--r--src/main.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 8ac2b460..7ecc5f2e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -3,7 +3,9 @@ PROGRAMS += nft
nft-destdir := @sbindir@
nft-obj += main.o
+ifeq (@with_cli@,yes)
nft-obj += cli.o
+endif
nft-obj += rule.o
nft-obj += statement.o
nft-obj += datatype.o
diff --git a/src/main.c b/src/main.c
index 2685b0db..3607bd58 100644
--- a/src/main.c
+++ b/src/main.c
@@ -335,7 +335,11 @@ int main(int argc, char * const *argv)
if (scanner_read_file(scanner, filename, &internal_location) < 0)
goto out;
} else if (interactive) {
- cli_init(&state);
+ if (cli_init(&state) < 0) {
+ fprintf(stderr, "%s: interactive CLI not supported in this build\n",
+ argv[0]);
+ exit(NFT_EXIT_FAILURE);
+ }
return 0;
} else {
fprintf(stderr, "%s: no command specified\n", argv[0]);