@cryptotaxi247 / netdata-1 / commits / 8ae0a356f

Use printf instead of echo for better POSIX compliance. (#9842)

Austin S. Hemmelgarn committed Aug 31, 2020 at 09:00 UTC 8ae0a356ffe07418334be51907f2886d64b1255b
6 files changed +6 -6
netdata-installer.sh
+1 -1
@@ -52,7 +52,7 @@ _cannot_use_tmpdir() {
52 return "${ret}"
53 fi
54
55 - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
55 + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
56 if chmod +x "${testfile}" ; then
57 if [ "$("${testfile}")" = "SUCCESS" ] ; then
58 ret=1
packaging/installer/kickstart-static64.sh
+1 -1
@@ -130,7 +130,7 @@ _cannot_use_tmpdir() {
130 return "${ret}"
131 fi
132
133 - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
133 + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
134 if chmod +x "${testfile}" ; then
135 if [ "$("${testfile}")" = "SUCCESS" ] ; then
136 ret=1
packaging/installer/kickstart.sh
+1 -1
@@ -162,7 +162,7 @@ _cannot_use_tmpdir() {
162 return "${ret}"
163 fi
164
165 - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
165 + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
166 if chmod +x "${testfile}" ; then
167 if [ "$("${testfile}")" = "SUCCESS" ] ; then
168 ret=1
packaging/installer/methods/kickstart-64.md
+1 -1
@@ -78,7 +78,7 @@ To use `md5sum` to verify the intregity of the `kickstart-static64.sh` script yo
78 command above, run the following:
79
80 ```bash
81 -[ "2b0219a71a070853e9109eecebb4be92" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
81 +[ "efddf41d3c19c4988601aecf5b483e3a" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
82 ```
83
84 If the script is valid, this command will return `OK, VALID`.
packaging/installer/methods/kickstart.md
+1 -1
@@ -61,7 +61,7 @@ To use `md5sum` to verify the intregity of the `kickstart.sh` script you will do
61 run the following:
62
63 ```bash
64 -[ "0bfd0e5d8ac868ff09957f1d43e8a35a" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
64 +[ "794498f7009012116aafe466d8f544ae" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
65 ```
66
67 If the script is valid, this command will return `OK, VALID`.
packaging/installer/netdata-updater.sh
+1 -1
@@ -72,7 +72,7 @@ _cannot_use_tmpdir() {
72 return "${ret}"
73 fi
74
75 - if /bin/echo -e '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
75 + if printf '#!/bin/sh\necho SUCCESS\n' > "${testfile}" ; then
76 if chmod +x "${testfile}" ; then
77 if [ "$("${testfile}")" = "SUCCESS" ] ; then
78 ret=1