#!/bin/sh # DESCRIPTION # # Setup network settings # 1. Truncate /etc/resolv.conf # 2. Init /etc/hosts with "127.0.0.1 localhost" # 3. Set hostname, domainname # 4. Set defaults for NetworkManager. # REQUIRES # # Nothing # INFO # At startup time hostname may be changed by live-hostname package. . shell-config NAME="init3-network" verbose() { if [ -n "$GLOBAL_VERBOSE" ]; then echo "HOOK: $NAME: $@" fi } verbose "has started" DOMAINNAME="localdomain" HOSTNAME="localhost.localdomain" verbose "Init /etc/hosts with 127.0.0.1 localhost" echo "127.0.0.1 localhost localhost.localdomain" > /etc/hosts verbose "Truncate /etc/resolv.conf" echo nameserver 8.8.8.8 >/etc/resolv.conf