1c4a7bd5dd
Putting any configuration into /etc/net/ifaces/lo/resolv.conf makes etcnet *overwrite* /etc/resolv.conf, while putting that into /etc/resolv.conf itself makes e.g. vzctl --nameserver *append* to what's been specified. Reported-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
11 lines
405 B
Bash
Executable File
11 lines
405 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)/d" /etc/resolv.conf
|