Fix IP address detection in installation summary for cross-distribution compatibility

- Replace hostname -I with ip addr parsing in show_installation_summary
- hostname -I not available on all distributions
This commit is contained in:
Mărcziem ™
2025-10-06 11:14:01 +02:00
parent ced9c14add
commit 648f90a304

View File

@@ -494,7 +494,7 @@ run_installation() {
# Installation summary
show_installation_summary() {
local ip_address
ip_address=$(hostname -I | awk '{print $1}')
ip_address=$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | head -1 | awk '{print $2}' | cut -d/ -f1)
local user_home
if [[ -n "${SUDO_USER:-}" ]]; then
user_home=$(eval echo "~${SUDO_USER}")