#! /bin/sh # # Make sure /etc/hostname, /etc/hosts and /target/etc/network/interfaces # exist before reboot. This is a fallback in case netcfg doesn't do it. set -e if [ ! -e /target/etc/hostname ]; then echo "localhost" > /target/etc/hostname fi if [ ! -e /target/etc/hosts ]; then echo "127.0.0.1 localhost" > /target/etc/hosts fi if [ ! -e /target/etc/network/interfaces ]; then # Every host needs the loopback interface cat > /target/etc/network/interfaces <