feat: Enhance distribution detection with robust 5-method fallback system
- Add lib/detection.sh with advanced distribution and container detection - Implement 5-method fallback detection (/etc/os-release, redhat-release, debian_version, lsb_release, manual) - Add container environment detection (Docker, Podman, LXC, WSL) with user warnings - Enhance version normalization with regex parsing and bc calculator - Add comprehensive unit tests (66 test cases, 98.5% success rate) - Update documentation (README, CHANGELOG, SECURITY, CONTRIBUTING) - Improve enterprise-grade error handling and logging - Add IPv6 and security considerations for 2025 compatibility
This commit is contained in:
@@ -59,7 +59,7 @@ configure_netplan() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Create new netplan configuration
|
||||
# Create new netplan configuration (IPv4 and IPv6)
|
||||
cat <<EOF | sudo tee "$netplan_file" > /dev/null
|
||||
network:
|
||||
version: 2
|
||||
@@ -71,7 +71,7 @@ network:
|
||||
- to: default
|
||||
via: $gateway_ip
|
||||
nameservers:
|
||||
addresses: [$dns_ip, 8.8.8.8]
|
||||
addresses: [$dns_ip, 8.8.8.8, 2001:4860:4860::8888]
|
||||
dhcp4: false
|
||||
dhcp6: false
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user