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

fix for ubuntu with xen network bridge with aliases. #17

Open
persuader opened this issue Mar 24, 2016 · 0 comments
Open

fix for ubuntu with xen network bridge with aliases. #17

persuader opened this issue Mar 24, 2016 · 0 comments

Comments

@persuader
Copy link

the script coulnd get all the ip addresses of the server interfaces when running xen dom0.
ifconfig does not show aliases for the bridge interface xenbr0 so server blocks his own ip-s.

i changed the line

SERVER_IP_LIST=ifconfig | grep "inet " | awk '{print $2}' | sed "s/addr://g" | xargs | sed -e 's/ /|/g'

to
SERVER_IP_LIST=( hostname -I ; echo 127.0.0.1 ) | cat | sed ':a;N;$!ba;s/\n/ /g' | sed 's/[[:space:]]\{1,\}/|/g' | sed s'/.$//'

Now everything works as expected.

Keep up the good work.

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

No branches or pull requests

1 participant