This is an automated email from the ASF dual-hosted git repository.
style95 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-devtools.git
The following commit(s) were added to refs/heads/master by this push:
new 9a4dad8 Improving support for other platforms (nixos) (#311)
9a4dad8 is described below
commit 9a4dad871612232aac9d8fcc5a0ae89729f3d216
Author: CreativeCactus <[email protected]>
AuthorDate: Sat Jan 4 01:09:34 2020 +1000
Improving support for other platforms (nixos) (#311)
* Allow for other paths to ifconfig
ifconfig might not always be in the same place (eg. on nixos). This way,
`env ifconfig x` will point to `ifconfig x`.
* Forcing env bash to run genssl
This might cause issues on other platforms, since this change does not seem
to be scoped to a `uname` check, as previous changes were. Please test.
---
docker-compose/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index 5737e85..a9b2176 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -2,10 +2,10 @@ UNAME_STR ?= $(shell uname)
# detect local ip of host as this is needed within containers to find the
OpenWhisk API container
ifeq ("$(UNAME_STR)","Linux")
- LOCAL_IP=$(shell LANG=en_US.utf8; route | grep default | tr -s " " |
cut -d " " -f 8 | xargs /sbin/ifconfig | grep "inet addr:" | cut -d ":" -f 2 |
cut -d " " -f 1)
+ LOCAL_IP=$(shell LANG=en_US.utf8; route | grep default | tr -s " " |
cut -d " " -f 8 | xargs env ifconfig | grep "inet addr:" | cut -d ":" -f 2 |
cut -d " " -f 1)
# inet addr: not present, trying with inet.
ifeq ($(LOCAL_IP), )
- LOCAL_IP=$(shell route | grep default | tr -s " " | cut -d " "
-f 8 | xargs /sbin/ifconfig | grep "inet " | tr -s " " | cut -d " " -f 3)
+ LOCAL_IP=$(shell route | grep default | tr -s " " | cut -d " "
-f 8 | xargs env ifconfig | grep "inet " | tr -s " " | cut -d " " -f 3)
endif
else
LOCAL_IP ?= $(shell ifconfig | grep "inet " | grep -v 127.0.0.1 | cut
-d\ -f2 | head -1)
@@ -241,7 +241,7 @@ setup:
[ -f
"$(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files/openwhisk-server-cert.pem"
]; then \
echo "using certificates present in
$(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files/"; \
else \
- $(OPENWHISK_PROJECT_HOME)/ansible/files/genssl.sh
$(DOCKER_HOST_IP) server $(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files; \
+ env bash $(OPENWHISK_PROJECT_HOME)/ansible/files/genssl.sh
$(DOCKER_HOST_IP) server $(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files; \
fi;
mkdir -p $(TMP_HOME)/tmp/openwhisk/api-gateway-ssl
cp $(OPENWHISK_PROJECT_HOME)/ansible/roles/nginx/files/*.pem
$(TMP_HOME)/tmp/openwhisk/api-gateway-ssl