From: Michael Tremer Date: Wed, 12 Dec 2018 11:34:12 +0000 (+0000) Subject: AWS: Prefer red* or eth* when importing configuration X-Git-Tag: suricata-beta4^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81e1e80e38609e01f98af649ee38e064420bab3d;p=people%2Fstevee%2Fipfire-2.x.git 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 --- 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})