Bootstrap Script for migrating systems to Foreman & Katello - katello-client-bootstrap/bootstrap.py at 312a438267dfedd44d3ff05407fda0a447e493a7 · Katello/katello-client-bootstrap
% hostname --ip-address fe80::c1a1:1e02:a06:e2ec%enp34s0u2u1u2 fe80::1009:5d1c:f076:27ed%wlp0s20f3 fe80::c600:86a0:db8b:c8c6%tailscale0 fe80::fc22:28ff:feeb:3f17%tap0 fe80::fcbc:58ff:fece:ff53%tap1 fe80::d78d:6d3c:6570:e013%tun0 2a02:abc:abcd:dddd:32dd:24c9:41e6:f5a9 2a02:abc:abcd:dddd:4d48:4f49:bbd5:43f9 fd7a:115c:a1e0:ab12:4843:cd96:624d:a073 fd10:39:192:1::135f 192.168.43.142 192.168.42.206 100.77.160.115 192.168.122.1 10.39.195.96 (phew, it did fit into a toot!)
on the other hand (well, phone, really), hostname gives me 127.0.0.1, exclusively, while the socket trick works "just fine". And then there is: % hostname --ip-address hostname: illegal option -- - usage: hostname [-f] [-s | -d] [name-of-host] (I should be happy it did not set the hostname to `--ip-address` I guess?)
*udp* port *80* (not a thing on 8.8.8.8) to get what I assume they intend to be the IP for the interface with the default route on it - this code doesnt even need a return packet, just the local addr
@silverwizard not even to mention ipv6 only networks, or boxes dual homed where the route to the gitea instance is on an interface that's not the default route
zhenech
•https://github.com/Katello/katello-client-bootstrap/blob/312a438267dfedd44d3ff05407fda0a447e493a7/bootstrap.py#L1323-L1333
(but at least I am not using 8.8.8.8?)
katello-client-bootstrap/bootstrap.py at 312a438267dfedd44d3ff05407fda0a447e493a7 · Katello/katello-client-bootstrap
GitHubPaul etnomailgaT
•zhenech
•but also, wasn't that code of yours trying to get the "default", so shouldn't it be using 0.0.0.0 as target?
Paul etnomailgaT
•zhenech
•Paul etnomailgaT
•zhenech
•fe80::c1a1:1e02:a06:e2ec%enp34s0u2u1u2 fe80::1009:5d1c:f076:27ed%wlp0s20f3 fe80::c600:86a0:db8b:c8c6%tailscale0 fe80::fc22:28ff:feeb:3f17%tap0 fe80::fcbc:58ff:fece:ff53%tap1 fe80::d78d:6d3c:6570:e013%tun0 2a02:abc:abcd:dddd:32dd:24c9:41e6:f5a9 2a02:abc:abcd:dddd:4d48:4f49:bbd5:43f9 fd7a:115c:a1e0:ab12:4843:cd96:624d:a073 fd10:39:192:1::135f 192.168.43.142 192.168.42.206 100.77.160.115 192.168.122.1 10.39.195.96
(phew, it did fit into a toot!)
zhenech
•And then there is:
% hostname --ip-address
hostname: illegal option -- -
usage: hostname [-f] [-s | -d] [name-of-host]
(I should be happy it did not set the hostname to `--ip-address` I guess?)
silverwizard
Paul etnomailgaT
•silverwizard likes this.
Paul etnomailgaT
•silverwizard likes this.
silverwizard
Paul etnomailgaT
•zhenech
•Paul etnomailgaT
•zhenech
•