Removed manually setting up /etc/hosts
This commit is contained in:
parent
14158cf61b
commit
6897c60731
|
@ -73,42 +73,10 @@ setup_dns() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_etc_host() {
|
|
||||||
tput setaf 2; tput bold; echo "Setting up /etc/hosts"; tput sgr0;
|
|
||||||
|
|
||||||
cat > /etc/hosts << EOF
|
|
||||||
127.0.0.1 localhost.my.domain localhost localhost.localdomain localhost
|
|
||||||
::1 localhost localhost.localdomain
|
|
||||||
|
|
||||||
2a0a:e5c1:144:: metadata
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# metadata=$(curl -s http://[2a0a:e5c1:144::]:9000)
|
|
||||||
# host_list=$(echo "$metadata" | jq -r '.["host-list"]')
|
|
||||||
# host_list_len=$(echo "$host_list" | jq -r '. | length')
|
|
||||||
|
|
||||||
# cat > /etc/hosts <<EOF
|
|
||||||
# 127.0.0.1 localhost.my.domain localhost localhost.localdomain localhost
|
|
||||||
# ::1 localhost localhost.localdomain
|
|
||||||
|
|
||||||
# $(
|
|
||||||
# for i in $(seq 0 $((host_list_len - 1)));
|
|
||||||
# do
|
|
||||||
# ip=$(echo $host_list | jq -r ".[$i][0]")
|
|
||||||
# hostname=$(echo $host_list | jq -r ".[$i][1]")
|
|
||||||
# printf "%-25s %s\n" $ip $hostname
|
|
||||||
# done
|
|
||||||
# )
|
|
||||||
# EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Main Code Starts here
|
# Main Code Starts here
|
||||||
|
|
||||||
make_script_verbose
|
make_script_verbose
|
||||||
|
|
||||||
setup_etc_host
|
|
||||||
|
|
||||||
setup_dns
|
setup_dns
|
||||||
|
|
||||||
# Initial Package Installation
|
# Initial Package Installation
|
||||||
|
|
Loading…
Reference in New Issue