From: Michael Tremer Date: Thu, 28 Jun 2018 09:57:13 +0000 (+0100) Subject: AWS: Calculate gateway and DNS IP addresses only for RED X-Git-Tag: v2.21-core123~114 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c86fd963d20b82593032c3c4b2d47dbdaa9def1a;p=ipfire-2.x.git AWS: Calculate gateway and DNS IP addresses only for RED Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/helper/aws-setup b/src/initscripts/helper/aws-setup index e6e733fb7d..10f01d8e70 100644 --- a/src/initscripts/helper/aws-setup +++ b/src/initscripts/helper/aws-setup @@ -103,16 +103,16 @@ import_aws_configuration() { local netaddress_num="$(to_integer "${netaddress}")" local broadcast="$(to_address $(( ipv4_address_num | (0xffffffff ^ netmask_num) )))" - # The gateway is always the first IP address in the subnet - local gateway="$(to_address $(( netaddress_num + 1 )))" - - # The AWS internal DNS service is available on the second IP address of the VPC - local dns1="$(to_address $(( vpc_netaddress_num + 2 )))" - local dns2= - case "${device_number}" in # RED 0) + # The gateway is always the first IP address in the subnet + local gateway="$(to_address $(( netaddress_num + 1 )))" + + # The AWS internal DNS service is available on the second IP address of the VPC + local dns1="$(to_address $(( vpc_netaddress_num + 2 )))" + local dns2= + ( echo "RED_TYPE=STATIC" echo "RED_DEV=red0"