-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
hostname -I in /lib/Froxlor/Cli/InstallCommand.php #1095
Comments
apart from that, congratz on v2. Upgrade went smooth and new interface is really nice ! |
Simply not true: We'll consider a more generalized way of retrieving all ip addresses of the host, thx |
Your solution did not return any ipv6 addresses, could you verify that the following snippet works as intended?
|
true, i didn't think of ipv6.
|
When running /lib/Froxlor/Cli/InstallCommand.php i'm getting an error with hostname -I not being a valid command
System information
To Reproduce
php ./bin/froxlor-cli froxlor:install
Logfiles
hostname: invalid option -- 'I'
Additional context
hostname utility is part of sys-apps/net-tools package on Gentoo.
All linux distro don't have the -I option for hostname.
I suggest the following one liner which will give you similar results, the output is one ip per line, so you shouldn't need to do an explode as it should directly be an array
ip addr show | awk '/inet / {split($2, a, "/"); if (a[1] != "127.0.0.1") print a[1]}'
if you want it to have the same output as you already have :
ip addr show | awk '/inet / {split($2, a, "/"); if (a[1] != "127.0.0.1") printf a[1]" "}'
The text was updated successfully, but these errors were encountered: