]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
aws: Setup DNS during init phase
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 15 Aug 2018 09:10:13 +0000 (10:10 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 15 Aug 2018 09:10:13 +0000 (10:10 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/helper/aws-setup

index 955583c0291951c6a356c8eaa8f159c585c276b1..777c8b9265f4afeda19c857356967dfa7ad1e97c 100644 (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}"
                ;;