From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4gGbnY6RRZz30NX for ; Thu, 14 May 2026 16:46:25 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4gGbnY65Hmz30LP for ; Thu, 14 May 2026 16:46:25 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [IPv6:2001:678:b28::161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bit raw public key) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "people01.haj.ipfire.org", Issuer "E8" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4gGbnX2zFvz5h2 for ; Thu, 14 May 2026 16:46:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1778777184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=gjJzoET+kwMSdjN2+ot8aitmS6e8uSEsAiB5gDgZa08=; b=GhdOqXaf7byaPPUXgv0VfbKaNx+P0bMVBal446o57mRjYG6bCKCNcbZcCifRkMokjHtJ6n OjOoXn9eprWDZCCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1778777184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=gjJzoET+kwMSdjN2+ot8aitmS6e8uSEsAiB5gDgZa08=; b=hiP7mf2D8v56GAifbNYBPsT9GQzcwW/UYIxlqIJtWwtD502vTLbbMK9HZB6EuA+MaP1OJ+ ocHZoKsml+zosz52FSI3NaepWHI/pRoJVh7wcdF/CturUzxnIT7s17OYmXMKpSjBgVxN4t JN0owymY6wNoRRB0aEQEI2pN1EaN5KhlGhkd1i5Wda7BBrz+9mcU45LQjBlIzTSKxJ9bsZ w822MimArGlvn1o9KRH9INouMPn93eJG14PVvp8cSCE9cuHrtZ5j76/+F0Glio+xMkODa5 sCZ4oy10X2bm3N2xUocO16TiJz/gbSOF4GGTsuUa+nyNrR6Y5M6KLgeq1M9Vcg== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4gGbnW5b5Xz2xTv; Thu, 14 May 2026 16:46:23 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 9d4921e021d8ef14b2bbd9a5c4a89938397dae07 X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: 7aae8f6849d117f366520839737951815cb5c8cd X-Git-Newrev: 9d4921e021d8ef14b2bbd9a5c4a89938397dae07 Message-Id: <4gGbnW5b5Xz2xTv@people01.haj.ipfire.org> Date: Thu, 14 May 2026 16:46:23 +0000 (UTC) From: Michael Tremer Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, next has been updated via 9d4921e021d8ef14b2bbd9a5c4a89938397dae07 (commit) via 0e39214dee0945f743fc24158fe7c611af75f549 (commit) from 7aae8f6849d117f366520839737951815cb5c8cd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9d4921e021d8ef14b2bbd9a5c4a89938397dae07 Author: Michael Tremer Date: Thu May 14 16:46:11 2026 +0000 core203: Ship AWS setup script Signed-off-by: Michael Tremer commit 0e39214dee0945f743fc24158fe7c611af75f549 Author: Michael Tremer Date: Thu Apr 30 18:47:35 2026 +0000 aws: Use IMDBv2 for the initial setup Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/rootfiles/core/203/filelists/files | 1 + src/initscripts/helper/aws-setup | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) Difference in files: diff --git a/config/rootfiles/core/203/filelists/files b/config/rootfiles/core/203/filelists/files index e69de29bb2..41dded32ec 100644 --- a/config/rootfiles/core/203/filelists/files +++ b/config/rootfiles/core/203/filelists/files @@ -0,0 +1 @@ +etc/rc.d/helper/aws-setup diff --git a/src/initscripts/helper/aws-setup b/src/initscripts/helper/aws-setup index 7b3371ac3a..6ad2a64796 100644 --- a/src/initscripts/helper/aws-setup +++ b/src/initscripts/helper/aws-setup @@ -28,10 +28,32 @@ export PATH=/usr/local/sbin:/usr/local/bin:${PATH} # AWS supports an MTU of up to 9001 bytes DEFAULT_MTU=9001 +# IMDSv2 token +IMDS_TOKEN="" + get() { local file="${1}" + local args=( + "--silent" + ) + + # Fetch the token if we don't have one, yet + if [ -z "${IMDS_TOKEN}" ]; then + IMDS_TOKEN="$(curl \ + --silent \ + --request "PUT" \ + --header "X-aws-ec2-metadata-token-ttl-seconds: 3600" \ + "http://169.254.169.254/latest/api/token")" + fi + + # Pass the token if we have been able to obtain it + if [ -n "${IMDS_TOKEN}" ]; then + args+=( + "--header" "X-aws-ec2-metadata-token: ${IMDS_TOKEN}" + ) + fi - wget -qO - "http://169.254.169.254/latest/${file}" + curl "${args[@]}" "http://169.254.169.254/latest/${file}" } to_address() { hooks/post-receive -- IPFire 2.x development tree