Explorar o código

IPV6: Small correction in install scripts after manual merge

asmcc %!s(int64=2) %!d(string=hai) anos
pai
achega
ca3ec79c5b
Modificáronse 2 ficheiros con 6 adicións e 3 borrados
  1. 2 1
      install/hst-install-debian.sh
  2. 4 2
      install/hst-install-ubuntu.sh

+ 2 - 1
install/hst-install-debian.sh

@@ -2047,7 +2047,8 @@ default_nic="$(ip -d -j route show | jq -r '.[] | if .dst == "default" then .dev
 primary_ipv4="$(ip -4 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
 primary_ipv4="$(ip -4 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
 # IPv6
 # IPv6
 primary_ipv6="$(ip -6 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
 primary_ipv6="$(ip -6 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
-ip="$primary_ipv4"
+ip=${primary_ipv4}
+ipv6=${primary_ipv6}
 local_ip=${primary_ipv4}
 local_ip=${primary_ipv4}
 local_ipv6=${primary_ipv6}
 local_ipv6=${primary_ipv6}
 
 

+ 4 - 2
install/hst-install-ubuntu.sh

@@ -2106,8 +2106,10 @@ default_nic="$(ip -d -j route show | jq -r '.[] | if .dst == "default" then .dev
 primary_ipv4="$(ip -4 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
 primary_ipv4="$(ip -4 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
 # IPv6
 # IPv6
 primary_ipv6="$(ip -6 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
 primary_ipv6="$(ip -6 -d -j addr show "$default_nic" | jq -r '.[].addr_info[] | if .scope == "global" then .local else empty end' | head -n1)"
-ip="$primary_ipv4"
-local_ip="$primary_ipv4"
+ip=${primary_ipv4}
+ipv6=${primary_ipv6}
+local_ip=${primary_ipv4}
+local_ipv6=${primary_ipv6}
 
 
 # Configuring firewall
 # Configuring firewall
 if [ "$iptables" = 'yes' ]; then
 if [ "$iptables" = 'yes' ]; then