From 72d2c4f3718ba5293e9e0fa8726406ee7d9f3940 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 5 Apr 2018 21:32:29 +0200 Subject: plugins: unload plugin if early init fails Change-Id: I32f68e2ee8f5d32962acdefb0193583f71d342b3 Signed-off-by: Damjan Marion --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') 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) -- cgit 1.2.3-korg