6889a65ebd
Some of those were long asking to be done but cubox project managed to actually get them done at least to the extent needed for it; so let's land those and prune things up a bit.
41 lines
717 B
Bash
Executable File
41 lines
717 B
Bash
Executable File
#!/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
|