-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I'm trying to install the Open Horizon management hub on my Intel Mac using the command
export HZN_LISTEN_IP=192.168.xxx.xxx # this may be irrelevant
curl -sSL https://raw.githubusercontent.com/open-horizon/devops/master/mgmt-hub/deploy-mgmt-hub.sh | bash
It fails with
bash: line 672: ip: command not found
There is no "ip" command on my Mac system, but there are both "ifconfig" and "ipconfig" commands which appears to do the similar things.
Joe Pearson said:
looks like the equivalent on Mac would be ipconfig getifaddr en0 for wireless or ipconfig getifaddr en1 for ethernet
However, I believe the problem is a bit more involved.
- My wifi is en0 (agrees with Joe)
- My ethernet is en9 (disagrees with Joe), but my network has a number of VLANs which is probably messing with these names.
- FYI: This link describes some of the many interface names Mac uses: https://stackoverflow.com/questions/29958143/what-are-en0-en1-p2p-and-so-on-that-are-displayed-after-executing-ifconfig
So perhaps the best approach is to have users specify which IP address they want to use via HZN_LISTEN_IP. I tried this above but don't think it had any effect. Or perhaps you use HZN_LISTEN_IP if it is set; otherwise fall back to use Joe's suggestion. In any case, "ip" won't work for Mac.