From 316c5912cdd0a58ff9685d867cc9c12884c8d814 Mon Sep 17 00:00:00 2001 From: Drew Moseley Date: Tue, 1 Dec 2020 11:19:22 -0500 Subject: [PATCH] Use numeric uid and gid for better cross-compatibility. Ubuntu calls group 0 "root" but MacOS calls it "wheel". This change allows the same code to function on both. Signed-off-by: Drew Moseley Changelog: Title --- scripts/bootstrap-rootfs-overlay-demo-server.sh | 4 ++-- scripts/bootstrap-rootfs-overlay-hosted-server.sh | 4 ++-- scripts/bootstrap-rootfs-overlay-production-server.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap-rootfs-overlay-demo-server.sh b/scripts/bootstrap-rootfs-overlay-demo-server.sh index af8b4c3..03ae6e4 100755 --- a/scripts/bootstrap-rootfs-overlay-demo-server.sh +++ b/scripts/bootstrap-rootfs-overlay-demo-server.sh @@ -91,7 +91,7 @@ ${server_ip} docker.mender.io s3.docker.mender.io EOF wget -q "https://raw.githubusercontent.com/mendersoftware/mender/master/support/demo.crt" -O ${output_dir}/etc/mender/server.crt -sudo chown -R root ${output_dir} -sudo chgrp -R root ${output_dir} +sudo chown -R 0 ${output_dir} +sudo chgrp -R 0 ${output_dir} echo "Configuration file for using Demo Mender Server written to: ${output_dir}/etc/mender" diff --git a/scripts/bootstrap-rootfs-overlay-hosted-server.sh b/scripts/bootstrap-rootfs-overlay-hosted-server.sh index 5f0d10e..f95b81f 100755 --- a/scripts/bootstrap-rootfs-overlay-hosted-server.sh +++ b/scripts/bootstrap-rootfs-overlay-hosted-server.sh @@ -70,7 +70,7 @@ EOF chmod 600 ${output_dir}/etc/mender/mender.conf -sudo chown -R root ${output_dir} -sudo chgrp -R root ${output_dir} +sudo chown -R 0 ${output_dir} +sudo chgrp -R 0 ${output_dir} echo "Configuration file for using Hosted Mender written to: ${output_dir}/etc/mender" diff --git a/scripts/bootstrap-rootfs-overlay-production-server.sh b/scripts/bootstrap-rootfs-overlay-production-server.sh index 9eb84bd..a3c5b7f 100755 --- a/scripts/bootstrap-rootfs-overlay-production-server.sh +++ b/scripts/bootstrap-rootfs-overlay-production-server.sh @@ -83,7 +83,7 @@ EOF chmod 600 ${output_dir}/etc/mender/mender.conf -sudo chown -R root ${output_dir} -sudo chgrp -R root ${output_dir} +sudo chown -R 0 ${output_dir} +sudo chgrp -R 0 ${output_dir} echo "Configuration file for using Production Mender Server written to: ${output_dir}/etc/mender"