From 81e1e80e38609e01f98af649ee38e064420bab3d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 12 Dec 2018 11:34:12 +0000 Subject: [PATCH] AWS: Prefer red* or eth* when importing configuration This change is necessary to make sure that the script prefers are link with internet access. That would usually be red (after the second boot) or eth* (on the first boot). That allows (and ensures) that we can install packages in the user-data script. Signed-off-by: Michael Tremer --- config/rootfiles/core/127/filelists/files | 1 + src/initscripts/system/aws | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/rootfiles/core/127/filelists/files b/config/rootfiles/core/127/filelists/files index ce4e517681..1bcc4ca548 100644 --- a/config/rootfiles/core/127/filelists/files +++ b/config/rootfiles/core/127/filelists/files @@ -2,3 +2,4 @@ etc/system-release etc/issue srv/web/ipfire/cgi-bin/credits.cgi var/ipfire/langs +etc/rc.d/init.d/aws diff --git a/src/initscripts/system/aws b/src/initscripts/system/aws index 2a556801ac..b22af75737 100644 --- a/src/initscripts/system/aws +++ b/src/initscripts/system/aws @@ -34,7 +34,8 @@ case "${1}" in running_on_ec2 || exit 0 # Find the first interface to use - for i in /sys/class/net/*; do + for i in /sys/class/net/red* /sys/class/net/eth* \ + /sys/class/net/*; do [ -d "${i}" ] || continue i=$(basename ${i}) -- 2.39.5