From dd4fae2f68e35a8b65df8788e6dd74a34e96f91f Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Tue, 15 Dec 2020 12:46:10 -0500 Subject: 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. --- packaging/installer/kickstart.sh | 5 +++-- packaging/installer/methods/kickstart.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index db3ff773e5..b92f2ef48b 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -374,7 +374,8 @@ while [ -n "${1}" ]; do export NETDATA_LOCAL_TARBALL_OVERRIDE_DEPS_SCRIPT="${1}" shift 1 else - break + NETDATA_INSTALLER_OPTIONS="$NETDATA_INSTALLER_OPTIONS ${1}" + shift 1 fi done @@ -473,7 +474,7 @@ cd netdata-* || fatal "Cannot cd to netdata source tree" install() { progress "Installing netdata..." - run ${sudo} ./netdata-installer.sh ${NETDATA_UPDATES} ${NETDATA_INSTALLER_OPTIONS} "${@}" || fatal "netdata-installer.sh exited with error" + run ${sudo} ./netdata-installer.sh ${NETDATA_UPDATES} ${NETDATA_INSTALLER_OPTIONS} || fatal "netdata-installer.sh exited with error" if [ -d "${ndtmpdir}" ] && [ ! "${ndtmpdir}" = "/" ]; then run ${sudo} rm -rf "${ndtmpdir}" > /dev/null 2>&1 fi diff --git a/packaging/installer/methods/kickstart.md b/packaging/installer/methods/kickstart.md index 4c2ba37de0..6d648d6529 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 -[ "02efc9e5ae084ad3aff072837dbedb1c" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" +[ "71e0dbb4af6f2cc7e89d358a1a942341" = "$(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`. -- cgit v1.2.3