Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth0 hardcoded #31

Closed
arnaudveron opened this issue Aug 28, 2017 · 1 comment
Closed

eth0 hardcoded #31

arnaudveron opened this issue Aug 28, 2017 · 1 comment
Assignees

Comments

@arnaudveron
Copy link

arnaudveron commented Aug 28, 2017

Hi

I suggest this patch to avoid relying on nic name

diff --git a/src/common/scripts/vnc_startup.sh b/src/common/scripts/vnc_startup.sh
index 7044bc2..8da7d87 100755
--- a/src/common/scripts/vnc_startup.sh
+++ b/src/common/scripts/vnc_startup.sh
@@ -17,7 +17,7 @@ fi
 $STARTUPDIR/chrome-init.sh
 
 ## resolve_vnc_connection
-VNC_IP=$(ip addr show eth0 | grep -Po 'inet \K[\d.]+')
+VNC_IP=$(ip route get 1 | awk '{print $NF;exit}')
 
 ## change vnc password
 echo -e "\n------------------ change VNC password  ------------------"
@toschneck
Copy link
Contributor

@arnaudveron thx for your great suggestion! I added the changes to the current dev branch (Docker images with Tag :dev will be updated automatically). After the next release, it will be also in the latest image 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants