mkimage-profiles/features.in/net/rootfs/image-scripts.d/50-net-resolv
2019-09-30 21:06:37 +03:00

11 lines
412 B
Bash
Executable File

#!/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