Fixed option parsing in kickstart.sh. (#10396)
* Fixed option parsing in kickstart.sh. The existing code is dependent on options specifically for the kickstart script coming before any options to be passed to the installer, resulting in some options being ignored if the wyere ordered in certain ways. This fixes the parsing to explicitly parse _all_ options so that we are not dependent on option order. * Fix checksums.
Austin S. Hemmelgarn committed
Dec 15, 2020 at 12:46 UTC
dd4fae2f68e35a8b65df8788e6dd74a34e96f91f
2 files changed
+4
-3
packaging/installer/kickstart.sh
+3
-2
@@ -374,7 +374,8 @@ while [ -n "${1}" ]; do
374
export NETDATA_LOCAL_TARBALL_OVERRIDE_DEPS_SCRIPT="${1}"
375
shift 1
376
else
377
- break
377
+ NETDATA_INSTALLER_OPTIONS="$NETDATA_INSTALLER_OPTIONS ${1}"
378
+ shift 1
379
fi
380
done
381
@@ -473,7 +474,7 @@ cd netdata-* || fatal "Cannot cd to netdata source tree"
474
475
install() {
476
progress "Installing netdata..."
476
- run ${sudo} ./netdata-installer.sh ${NETDATA_UPDATES} ${NETDATA_INSTALLER_OPTIONS} "${@}" || fatal "netdata-installer.sh exited with error"
477
+ run ${sudo} ./netdata-installer.sh ${NETDATA_UPDATES} ${NETDATA_INSTALLER_OPTIONS} || fatal "netdata-installer.sh exited with error"
478
if [ -d "${ndtmpdir}" ] && [ ! "${ndtmpdir}" = "/" ]; then
479
run ${sudo} rm -rf "${ndtmpdir}" > /dev/null 2>&1
480
fi
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
-[ "02efc9e5ae084ad3aff072837dbedb1c" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
64
+[ "71e0dbb4af6f2cc7e89d358a1a942341" = "$(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`.