aws: Setup DNS during init phase

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-08-15 10:10:13 +01:00
parent 1e1806adce
commit 647ca912a2

View File

@@ -289,11 +289,22 @@ case "${reason}" in
# Add the default route
ip route add default via "${new_routers}"
# Setup DNS
for domain_name_server in ${new_domain_name_servers}; do
echo "nameserver ${domain_name_server}"
done > /etc/resolv.conf
# The system is online now
touch /var/ipfire/red/active
# Import AWS configuration
import_aws_configuration
;;
EXPIRE|FAIL|RELEASE|STOP)
# The system is no longer online
rm -f /var/ipfire/red/active
# Remove all IP addresses
ip addr flush dev "${interface}"
;;