diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-08-31 09:00:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 09:00:42 -0400 |
commit | 8ae0a356ffe07418334be51907f2886d64b1255b (patch) | |
tree | 7255646c7899cf32dc83d1ac87d0b39894638460 | |
parent | 0eb072c9a0e0b1e58a4db660a576032a1aa99044 (diff) |
Use printf instead of echo for better POSIX compliance. (#9842)
-rwxr-xr-x | netdata-installer.sh | 2 | ||||
-rwxr-xr-x | packaging/installer/kickstart-static64.sh | 2 | ||||
-rwxr-xr-x | packaging/installer/kickstart.sh | 2 | ||||
-rw-r--r-- | packaging/installer/methods/kickstart-64.md | 2 | ||||
-rw-r--r-- | packaging/installer/methods/kickstart.md | 2 | ||||
-rwxr-xr-x | packaging/installer/netdata-updater.sh | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index c40d03473e..eba7f1be9c 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -52,7 +52,7 @@ _cannot_use_tmpdir() { return "${ret}" fi - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then if chmod +x "${testfile}" ; then if [ "$("${testfile}")" = "SUCCESS" ] ; then ret=1 diff --git a/packaging/installer/kickstart-static64.sh b/packaging/installer/kickstart-static64.sh index 7118d2c006..3f8445759b 100755 --- a/packaging/installer/kickstart-static64.sh +++ b/packaging/installer/kickstart-static64.sh @@ -130,7 +130,7 @@ _cannot_use_tmpdir() { return "${ret}" fi - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then if chmod +x "${testfile}" ; then if [ "$("${testfile}")" = "SUCCESS" ] ; then ret=1 diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index e8f2601eb2..3e4711db8c 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -162,7 +162,7 @@ _cannot_use_tmpdir() { return "${ret}" fi - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then if chmod +x "${testfile}" ; then if [ "$("${testfile}")" = "SUCCESS" ] ; then ret=1 diff --git a/packaging/installer/methods/kickstart-64.md b/packaging/installer/methods/kickstart-64.md index cf1207ada4..a45f2992fe 100644 --- a/packaging/installer/methods/kickstart-64.md +++ b/packaging/installer/methods/kickstart-64.md @@ -78,7 +78,7 @@ To use `md5sum` to verify the intregity of the `kickstart-static64.sh` script yo command above, run the following: ```bash -[ "2b0219a71a070853e9109eecebb4be92" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" +[ "efddf41d3c19c4988601aecf5b483e3a" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" ``` If the script is valid, this command will return `OK, VALID`. diff --git a/packaging/installer/methods/kickstart.md b/packaging/installer/methods/kickstart.md index 281bd4fb05..ce4fb94b7c 100644 --- a/packaging/installer/methods/kickstart.md +++ b/packaging/installer/methods/kickstart.md @@ -61,7 +61,7 @@ To use `md5sum` to verify the intregity of the `kickstart.sh` script you will do run the following: ```bash -[ "0bfd0e5d8ac868ff09957f1d43e8a35a" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" +[ "794498f7009012116aafe466d8f544ae" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" ``` If the script is valid, this command will return `OK, VALID`. diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index 57ffb607ae..0ce0cba9bd 100755 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -72,7 +72,7 @@ _cannot_use_tmpdir() { return "${ret}" fi - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then if chmod +x "${testfile}" ; then if [ "$("${testfile}")" = "SUCCESS" ] ; then ret=1 |