mkimage-profiles/features.in/armh/rootfs/image-scripts.d/50-network
Michael Shigorin 6889a65ebd armh.mk: use those new and shiny features for cubox
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.
2013-07-02 00:00:30 +04:00

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