From: Michael Tremer <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 8defa50e7395714930dd3a813ad4c509711c0b57
Date: Mon, 13 Aug 2018 12:16:04 +0100 [thread overview]
Message-ID: <20180813111605.040A61081BD3@git01.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 3105 bytes --]
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 8defa50e7395714930dd3a813ad4c509711c0b57 (commit)
from 3d0e252e35ad404529797b3c52232ca52c378f93 (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 8defa50e7395714930dd3a813ad4c509711c0b57
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Mon Aug 13 12:14:49 2018 +0100
aws: Execute user-data script while we have networking up
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
src/initscripts/helper/aws-setup | 25 +++++++++++++++++--------
src/initscripts/system/aws | 8 --------
2 files changed, 17 insertions(+), 16 deletions(-)
Difference in files:
diff --git a/src/initscripts/helper/aws-setup b/src/initscripts/helper/aws-setup
index 122e5a31d..955583c02 100644
--- a/src/initscripts/helper/aws-setup
+++ b/src/initscripts/helper/aws-setup
@@ -109,8 +109,23 @@ import_aws_configuration() {
fi
done
- # Download user-data
- local user_data="$(get user-data)"
+ # Download the user-data script only on the first boot
+ if [ ! -e "/var/ipfire/main/firstsetup_ok" ]; then
+ # Download user-data
+ local user_data="$(get user-data)"
+
+ # Save user-data script to be executed later
+ if [ "${user_data:0:2}" = "#!" ]; then
+ echo "${user_data}" > /tmp/aws-user-data.script
+ chmod 700 /tmp/aws-user-data.script
+
+ # Run the user-data script
+ /tmp/aws-user-data.script
+
+ # Delete the script right away
+ rm /tmp/aws-user-data.script
+ fi
+ fi
# Import any DNS server settings
eval $(/usr/local/bin/readhash <(grep -E "^DNS([0-9])=" /var/ipfire/ethernet/settings 2>/dev/null))
@@ -252,12 +267,6 @@ import_aws_configuration() {
# This script has now completed the first steps of setup
touch /var/ipfire/main/firstsetup_ok
-
- # Save user-data script to be executed later
- if [ "${user_data:0:2}" = "#!" ]; then
- echo "${user_data}" > /tmp/aws-user-data.script
- chmod 700 /tmp/aws-user-data.script
- fi
fi
# All done
diff --git a/src/initscripts/system/aws b/src/initscripts/system/aws
index 896b3b17a..6fce670a0 100644
--- a/src/initscripts/system/aws
+++ b/src/initscripts/system/aws
@@ -60,14 +60,6 @@ case "${1}" in
# End DHCP client immediately
dhclient -sf /etc/rc.d/helper/aws-setup -r "${intf}" &>/dev/null
- # Run AWS user-data script
- if [ -x "/tmp/aws-user-data.script" ]; then
- /tmp/aws-user-data.script
-
- # Delete the script right away
- rm /tmp/aws-user-data.script
- fi
-
exit 0
;;
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2018-08-13 11:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180813111605.040A61081BD3@git01.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox