Browse Source
Merge pull request #219 from merlin-northern/men_3762_chmod_600_on_config
MEN-3762 chmod 600 on mender.conf
revert-252-rm-only-tag-2.2.x
Peter Grzybowski
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
8 additions and
0 deletions
-
mender-convert-modify
-
scripts/bootstrap-rootfs-overlay-demo-server.sh
-
scripts/bootstrap-rootfs-overlay-hosted-server.sh
-
scripts/bootstrap-rootfs-overlay-production-server.sh
|
|
@ -193,6 +193,7 @@ cat <<- EOF > work/mender.conf.data |
|
|
|
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 [ -z "${MENDER_DEVICE_TYPE}" ]; then |
|
|
|
# Observed systems who do not have this file, e.g images generated with mkosi |
|
|
|
|
|
@ -62,6 +62,9 @@ cat <<- EOF > ${output_dir}/etc/mender/mender.conf |
|
|
|
"UpdatePollIntervalSeconds": 5 |
|
|
|
} |
|
|
|
EOF |
|
|
|
|
|
|
|
chmod 600 ${output_dir}/etc/mender/mender.conf |
|
|
|
|
|
|
|
cat <<- EOF > ${output_dir}/etc/hosts |
|
|
|
127.0.0.1 localhost |
|
|
|
|
|
|
|
|
|
@ -64,6 +64,8 @@ cat <<- EOF > ${output_dir}/etc/mender/mender.conf |
|
|
|
} |
|
|
|
EOF |
|
|
|
|
|
|
|
chmod 600 ${output_dir}/etc/mender/mender.conf |
|
|
|
|
|
|
|
sudo chown -R root.root ${output_dir} |
|
|
|
|
|
|
|
echo "Configuration file for using Hosted Mender written to: ${output_dir}/etc/mender" |
|
|
|
|
|
@ -77,6 +77,8 @@ cat <<- EOF >> ${output_dir}/etc/mender/mender.conf |
|
|
|
} |
|
|
|
EOF |
|
|
|
|
|
|
|
chmod 600 ${output_dir}/etc/mender/mender.conf |
|
|
|
|
|
|
|
sudo chown -R root.root ${output_dir} |
|
|
|
|
|
|
|
echo "Configuration file for using Production Mender Server written to: ${output_dir}/etc/mender" |
|
|
|