mkimage-profiles/features.in/net/rootfs/image-scripts.d/50-net-resolv
Michael Shigorin 5d829265db live, net: shift and rework network and resolver setup
50-setup-network was a hasty hack (surprise!) that used to do
what net and net-eth features have been created to do since;
just drop the duplicated crufty code.

Unconditional resolver setup isn't done now: those with static
setup are better off doing it explicitly, and those with DHCP
should be fine already.

NB: /etc/hosts *is* fine within setup package *but* hasher will
    overwrite it with a copy of host's one; let's reset contents
    to initial at least until hasher gets fixed and the fix is
    rather deployed in the wild.
2014-03-17 21:22:29 +04:00

18 lines
480 B
Bash
Executable File

#!/bin/sh
# offer some convenient servers for static configuration cases
if [ -d /etc/net/ifaces/lo ]; then
{
echo "# yandex"
echo "#nameserver 77.88.8.1"
echo "# google"
echo "#nameserver 8.8.8.8"
echo "# level3"
echo "#nameserver 4.2.2.3"
} >> /etc/net/ifaces/lo/resolv.conf
fi
find /var -name resolv.conf -or -name nsswitch.conf -delete
# hasher might have carried host /etc/hosts over, need to overwrite
echo "127.0.0.1 localhost.localdomain localhost" > /etc/hosts