Removed manually setting up /etc/hosts

This commit is contained in:
ahmadbilalkhalid 2019-11-14 14:33:33 +05:00
parent 14158cf61b
commit 6897c60731
1 changed files with 0 additions and 32 deletions

View File

@ -73,42 +73,10 @@ setup_dns() {
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
make_script_verbose
setup_etc_host
setup_dns
# Initial Package Installation