From 0f224ad770d01494db31c875ef2e31a766735527 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 28 Jun 2018 11:01:33 +0100 Subject: [PATCH] AWS: Add support for ORANGE Signed-off-by: Michael Tremer --- src/initscripts/helper/aws-setup | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/initscripts/helper/aws-setup b/src/initscripts/helper/aws-setup index 2fae9ea18c..19edb2b921 100644 --- a/src/initscripts/helper/aws-setup +++ b/src/initscripts/helper/aws-setup @@ -69,10 +69,8 @@ import_aws_configuration() { eval $(/usr/local/bin/readhash <(grep -E "^DNS([0-9])=" /var/ipfire/ethernet/settings 2>/dev/null)) # Import network configuration - ( - # RED + GREEN - echo "CONFIG_TYPE=1" - ) > /var/ipfire/ethernet/settings + local config_type=1 + : > /var/ipfire/ethernet/settings local mac for mac in $(get network/interfaces/macs/); do @@ -145,9 +143,27 @@ import_aws_configuration() { echo "GREEN_BROADCAST=${broadcast}" ) >> /var/ipfire/ethernet/settings ;; + + # ORANGE + 2) + config_type=2 + + ( + echo "ORANGE_DEV=orange0" + echo "ORANGE_MACADDR=${mac}" + echo "ORANGE_DESCRIPTION='${interface_id}'" + echo "ORANGE_ADDRESS=${ipv4_address}" + echo "ORANGE_NETMASK=${netmask}" + echo "ORANGE_NETADDRESS=${netaddress}" + echo "ORANGE_BROADCAST=${broadcast}" + ) >> /var/ipfire/ethernet/settings + ;; esac done + # Save CONFIG_TYPE + echo "CONFIG_TYPE=${config_type}" >> /var/ipfire/ethernet/settings + # Import SSH keys local line for line in $(get "public-keys/"); do -- 2.39.5