Browse Source

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 <kristian.amlie@northern.tech>
automatic_bootstrap_artifact
Kristian Amlie 2 years ago
parent
commit
e2e70faa0e
No known key found for this signature in database GPG Key ID: F464407C996AF03F
  1. 6
      mender-convert-modify
  2. 6
      scripts/bootstrap-rootfs-overlay-demo-server.sh
  3. 8
      scripts/bootstrap-rootfs-overlay-hosted-server.sh
  4. 10
      scripts/bootstrap-rootfs-overlay-production-server.sh

6
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

6
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"

8
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 <paste your token here>"
echo "Usage: $(basename $0) --output-dir ./input/rootfs_overlay_demo --tenant-token <paste your token here>"
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"

10
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"

Loading…
Cancel
Save