aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-04-05 21:32:29 +0200
committerDave Barach <openvpp@barachs.net>2018-04-09 16:06:20 +0000
commit72d2c4f3718ba5293e9e0fa8726406ee7d9f3940 (patch)
tree799a61d776b35e640bf2542148bcca946b926dca /Makefile
parentf13a8787365300d757eca4624c8f8a6b7c49392b (diff)
plugins: unload plugin if early init fails
Change-Id: I32f68e2ee8f5d32962acdefb0193583f71d342b3 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c893e02796f..06e15f0d499 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ GDB?=gdb
PLATFORM?=vpp
SAMPLE_PLUGIN?=no
MACHINE=$(shell uname -m)
+SUDO?=sudo
,:=,
define disable_plugins
@@ -410,12 +411,12 @@ define run
@echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
@echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
@cd $(STARTUP_DIR) && \
- sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF)
+ $(SUDO) $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF)
endef
else
define run
@cd $(STARTUP_DIR) && \
- sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//')
+ $(SUDO) $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//')
endef
endif
@@ -445,7 +446,7 @@ build-vat:
$(call make,$(PLATFORM)_debug,vpp-api-test-install)
run-vat:
- @sudo $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test
+ @$(SUDO) $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp_api_test
pkg-deb:
$(call make,$(PLATFORM),install-deb)