From e2e70faa0e1526f757bfc62282e4f7d2eb174703 Mon Sep 17 00:00:00 2001 From: Kristian Amlie Date: Wed, 8 Jun 2022 10:18:52 +0200 Subject: [PATCH] fix: `resource` folder needs to be inside `input` after Dockerization. No changelog needed, since nothing is released yet. Changelog: None Ticket: None Signed-off-by: Kristian Amlie --- mender-convert-modify | 6 +++--- scripts/bootstrap-rootfs-overlay-demo-server.sh | 6 +++--- scripts/bootstrap-rootfs-overlay-hosted-server.sh | 8 ++++---- scripts/bootstrap-rootfs-overlay-production-server.sh | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mender-convert-modify b/mender-convert-modify index f6ad9b1..59712d8 100755 --- a/mender-convert-modify +++ b/mender-convert-modify @@ -179,13 +179,13 @@ EOF run_and_log_cmd "sudo cp work/mender.conf.data work/rootfs/data/mender/mender.conf" run_and_log_cmd "sudo chmod 600 work/rootfs/data/mender/mender.conf" -if [ -f resources/mender.conf ]; then +if [ -f input/resources/mender.conf ]; then log_info "Installing the local mender.conf file" run_and_log_cmd "mkdir -p work/rootfs/etc/mender" - run_and_log_cmd "cp resources/mender.conf work/rootfs/etc/mender" + run_and_log_cmd "cp input/resources/mender.conf work/rootfs/etc/mender" run_and_log_cmd "sudo chmod 600 work/rootfs/etc/mender/mender.conf" else - log_warn "No mender.conf file found in resources. Have you remembered to run the bootstrap script?" + log_warn "No mender.conf file found in input/resources. Have you remembered to run the bootstrap script?" fi if [ -z "${MENDER_DEVICE_TYPE}" ]; then diff --git a/scripts/bootstrap-rootfs-overlay-demo-server.sh b/scripts/bootstrap-rootfs-overlay-demo-server.sh index 5b3e4ec..d2d22a8 100755 --- a/scripts/bootstrap-rootfs-overlay-demo-server.sh +++ b/scripts/bootstrap-rootfs-overlay-demo-server.sh @@ -58,8 +58,8 @@ if [ -e ${output_dir} ]; then fi mkdir -p ${output_dir}/etc/mender -mkdir -p ${root_dir}/resources -cat <<- EOF > ${root_dir}/resources/mender.conf +mkdir -p ${root_dir}/input/resources +cat <<- EOF > ${root_dir}/input/resources/mender.conf { "ServerURL": "https://docker.mender.io", "ServerCertificate": "/etc/mender/server.crt" @@ -81,4 +81,4 @@ wget -q "https://raw.githubusercontent.com/mendersoftware/mender/master/support/ sudo chown -R 0 ${output_dir} sudo chgrp -R 0 ${output_dir} -echo "Configuration file for using Demo Mender Server written to: ${root_dir}/resources/mender.conf" +echo "Configuration file for using Demo Mender Server written to: ${root_dir}/input/resources/mender.conf" diff --git a/scripts/bootstrap-rootfs-overlay-hosted-server.sh b/scripts/bootstrap-rootfs-overlay-hosted-server.sh index 01b5b91..897768d 100755 --- a/scripts/bootstrap-rootfs-overlay-hosted-server.sh +++ b/scripts/bootstrap-rootfs-overlay-hosted-server.sh @@ -37,7 +37,7 @@ while (("$#")); do ;; *) echo "Sorry but the provided option is not supported: $1" - echo "Usage: $(basename $0) --output-dir ./rootfs_overlay_demo --tenant-token " + echo "Usage: $(basename $0) --output-dir ./input/rootfs_overlay_demo --tenant-token " exit 1 ;; esac @@ -57,8 +57,8 @@ if [ -e ${output_dir} ]; then sudo chown -R $(id -u) ${output_dir} sudo chgrp -R $(id -g) ${output_dir} fi -mkdir -p ${root_dir}/resources -cat <<- EOF > ${root_dir}/resources/mender.conf +mkdir -p ${root_dir}/input/resources +cat <<- EOF > ${root_dir}/input/resources/mender.conf { "ServerURL": "https://hosted.mender.io/", "TenantToken": "${tenant_token}" @@ -68,4 +68,4 @@ EOF sudo chown -R 0 ${output_dir} sudo chgrp -R 0 ${output_dir} -echo "Configuration file for using Hosted Mender written to: ${root_dir}/resources/mender.conf" +echo "Configuration file for using Hosted Mender written to: ${root_dir}/input/resources/mender.conf" diff --git a/scripts/bootstrap-rootfs-overlay-production-server.sh b/scripts/bootstrap-rootfs-overlay-production-server.sh index a60bbb0..dd21786 100755 --- a/scripts/bootstrap-rootfs-overlay-production-server.sh +++ b/scripts/bootstrap-rootfs-overlay-production-server.sh @@ -62,24 +62,24 @@ if [ -e ${output_dir} ]; then sudo chgrp -R $(id -g) ${output_dir} fi -mkdir -p ${root_dir}/resources -cat <<- EOF > ${root_dir}/resources/mender.conf +mkdir -p ${root_dir}/input/resources +cat <<- EOF > ${root_dir}/input/resources/mender.conf { "ServerURL": "${server_url}", EOF if [ -n "${server_cert}" ]; then - cat <<- EOF >> ${root_dir}/resources/mender.conf + cat <<- EOF >> ${root_dir}/input/resources/mender.conf "ServerCertificate": "/etc/mender/server.crt" EOF cp -f "${server_cert}" ${output_dir}/etc/mender/server.crt fi -cat <<- EOF >> ${root_dir}/resources/mender.conf +cat <<- EOF >> ${root_dir}/input/resources/mender.conf } EOF sudo chown -R 0 ${output_dir} sudo chgrp -R 0 ${output_dir} -echo "Configuration file for using Production Mender Server written to: ${root_dir}/resources/mender.conf" +echo "Configuration file for using Production Mender Server written to: ${root_dir}/input/resources/mender.conf"