Commit b6189c42 authored by Guido Gunther's avatar Guido Gunther

root.sh Move network setup into function

parent 292facf2
......@@ -205,12 +205,9 @@ EOF
}
# create the directories so that this script can be tested without the generated filesystem
mkdir -p $basedir/etc/apt/apt.conf.d/
mkdir -p $basedir/etc/network
cat << EOF > $basedir/etc/hosts
function setup_network()
{
cat << EOF > $basedir/etc/hosts
127.0.0.1 pureos localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
......@@ -219,7 +216,7 @@ ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
EOF
cat << EOF > $basedir/etc/network/interfaces
cat << EOF > $basedir/etc/network/interfaces
auto lo
iface lo inet loopback
......@@ -230,12 +227,17 @@ EOF
# Don't setup resolv.conf if it's a symlink
# DHCP will later handle this just fine
if [ -f $basedir/etc/resolv.conf ]; then
cat <<EOF > $basedir/etc/resolv.conf
if [ -f $basedir/etc/resolv.conf ]; then
cat <<EOF > $basedir/etc/resolv.conf
nameserver 208.67.220.220
nameserver 208.67.222.222
EOF
fi
fi
}
# create the directories so that this script can be tested without the generated filesystem
mkdir -p $basedir/etc/apt/apt.conf.d/
mkdir -p $basedir/etc/network
export MALLOC_CHECK_=0 # workaround for LP: #520465
export LC_ALL=C
......@@ -246,6 +248,7 @@ console-common console-data/keymap/policy select Select keymap from full list
console-common console-data/keymap/full select en-latin1-nodeadkeys
EOF
setup_network
prepare_chroot
setup_qemu
setup_apt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment