From 8f24ca9ff739866de42f7cd302562dc3f81c56c4 Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Sun, 24 May 2020 12:35:10 +0100 Subject: [PATCH] Added separate flag to build api explicitly --- src/fastnetmon_install.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fastnetmon_install.pl b/src/fastnetmon_install.pl index 3d6da528..f5ad8b89 100755 --- a/src/fastnetmon_install.pl +++ b/src/fastnetmon_install.pl @@ -104,6 +104,7 @@ my $use_modern_pf_ring = ''; my $show_help = ''; my $enable_gobgp_backend = ''; +my $enable_api = ''; # Get options from command line GetOptions( @@ -111,11 +112,12 @@ GetOptions( 'do-not-track-me' => \$do_not_track_me, 'use-modern-pf-ring' => \$use_modern_pf_ring, 'gobgp' => \$enable_gobgp_backend, + 'api' => \$enable_api, 'help' => \$show_help, ); if ($show_help) { - print "We have following options: --use-git-master --do-not-track-me --use-modern-pf-ring --gobgp --help\n"; + print "We have following options:\n--use-git-master\n--do-not-track-me\n--use-modern-pf-ring\n--gobgp\n--api\n--help\n"; exit (0); } @@ -139,7 +141,8 @@ my $we_have_protobuf_support = ''; my $we_have_grpc_support = ''; my $we_have_gobgp_support = ''; -if ($enable_gobgp_backend) { +# These modes use same modules +if ($enable_gobgp_backend || $enable_api) { $we_have_protobuf_support = 1; $we_have_grpc_support = 1; $we_have_gobgp_support = 1;