Preserve environment variables when starting VPP 92/9992/1
authorMichal Mazur <[email protected]>
Thu, 4 Jan 2018 15:11:24 +0000 (16:11 +0100)
committerMichal Mazur <[email protected]>
Mon, 8 Jan 2018 14:29:09 +0000 (15:29 +0100)
Environment variables may contain configuration for platform drivers.
They were lost when starting VPP using 'make run/debug' commands.

Change-Id: I47d71b1d47a33cb8386f106bac215208e7030b1d
Signed-off-by: Michal Mazur <[email protected]>
Makefile

index 3ef236a..ee59d41 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -351,13 +351,13 @@ 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 -E $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) \
            plugin_path $(subst $(subst ,, ),:,$(wildcard $(1)/*/lib*/vpp_plugins))
 endef
 else
 define run
        @cd $(STARTUP_DIR) && \
-         sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') \
+         sudo -E $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') \
            plugin_path $(subst $(subst ,, ),:,$(wildcard $(1)/*/lib*/vpp_plugins))
 endef
 endif