50-net-resolv 412 Bytes
Newer Older
1
#!/bin/sh
2
# see also net-dns feature for actual nameserver control
3

4 5
# purge hasher-provided files potentially disclosing
# build host's network configuration bits
6 7 8 9
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
10
sed -ri "/^(search|nameserver|domain)/d" /etc/resolv.conf