mkimage-profiles/features.in/net/rootfs/image-scripts.d/50-net-resolv

11 lines
412 B
Plaintext
Raw Normal View History

#!/bin/sh
# see also net-dns feature for actual nameserver control
# purge hasher-provided files potentially disclosing
# build host's network configuration bits
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
sed -ri "/^(search|nameserver|domain)/d" /etc/resolv.conf