@cryptotaxi247 / netdata-1 / commits / 585081071

Rename --install option for kickstart.sh (#12798)

* replace --install flag with --install-prefix and update documentation * fix * minor fix

maneamarius committed May 3, 2022 at 11:06 UTC 5850810715a9b2fc9413a2b43ae2dc1d1a5b4bf6
3 files changed +21 -5
netdata-installer.sh
+10 -1
@@ -161,6 +161,10 @@ banner_nonroot_install() {
161
162 Please set an installation prefix, like this:
163
164 + $PROGRAM ${@} --install-prefix /tmp
165 +
166 + or
167 +
168 $PROGRAM ${@} --install /tmp
169
170 or, run the installer as root:
@@ -199,7 +203,8 @@ usage() {
203 USAGE: ${PROGRAM} [options]
204 where options include:
205
202 - --install <path> Install netdata in <path>. Ex. --install /opt will put netdata in /opt/netdata.
206 + --install <path> Install netdata in <path>. Ex. --install /opt will put netdata in /opt/netdata, this option is deprecated and will be removed in a future version, please use --install-prefix instead.
207 + --install-prefix <path> Install netdata in <path>. Ex. --install-prefix /opt will put netdata in /opt/netdata.
208 --dont-start-it Do not (re)start netdata after installation.
209 --dont-wait Run installation in non-interactive mode.
210 --stable-channel Use packages from GitHub release pages instead of nightly updates.
@@ -370,6 +375,10 @@ while [ -n "${1}" ]; do
375 NETDATA_PREFIX="${2}/netdata"
376 shift 1
377 ;;
378 + "--install-prefix")
379 + NETDATA_PREFIX="${2}/netdata"
380 + shift 1
381 + ;;
382 "--install-no-prefix")
383 NETDATA_PREFIX="${2}"
384 shift 1
packaging/installer/kickstart.sh
+9 -3
@@ -135,7 +135,8 @@ USAGE: kickstart.sh [options]
135 --reinstall-even-if-unsafe Even try to reinstall if we don't think we can do so safely (implies --reinstall).
136 --disable-cloud Disable support for Netdata Cloud (default: detect)
137 --require-cloud Only install if Netdata Cloud can be enabled. Overrides --disable-cloud.
138 - --install <path> Specify an installation prefix for local builds (default: autodetect based on system type).
138 + --install <path> This option is deprecated and will be removed in a future version, use --install-prefix instead.
139 + --install-prefix <path> Specify an installation prefix for local builds (default: autodetect based on system type).
140 --old-install-prefix <path> Specify an old local builds installation prefix for uninstall/reinstall (if it's not default).
141 --claim-token Use a specified token for claiming to Netdata Cloud.
142 --claim-rooms When claiming, add the node to the specified rooms.
@@ -920,11 +921,11 @@ EOF
921
922 confirm_install_prefix() {
923 if [ -n "${INSTALL_PREFIX}" ] && [ "${NETDATA_ONLY_BUILD}" -ne 1 ]; then
923 - fatal "The \`--install\` option is only supported together with the \`--build-only\` option." F0204
924 + fatal "The \`--install-prefix\` and \`--install\` options are only supported together with the \`--build-only\` option." F0204
925 fi
926
927 if [ -n "${INSTALL_PREFIX}" ]; then
927 - NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --install ${INSTALL_PREFIX}"
928 + NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --install-prefix ${INSTALL_PREFIX}"
929 else
930 case "${SYSTYPE}" in
931 Darwin)
@@ -1742,6 +1743,11 @@ while [ -n "${1}" ]; do
1743 NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --disable-telemetry"
1744 ;;
1745 "--install")
1746 + warning "--install flag is deprecated and will be removed in a future version. Please use --install-prefix instead."
1747 + INSTALL_PREFIX="${2}"
1748 + shift 1
1749 + ;;
1750 + "--install-prefix")
1751 INSTALL_PREFIX="${2}"
1752 shift 1
1753 ;;
packaging/installer/methods/kickstart.md
+2 -1
@@ -63,7 +63,8 @@ The `kickstart.sh` script accepts a number of optional parameters to control how
63 - `--disable-cloud`: For local builds, don’t build any of the cloud code at all. For native packages and static builds,
64 use runtime configuration to disable cloud support.
65 - `--require-cloud`: Only install if Netdata Cloud can be enabled. Overrides `--disable-cloud`.
66 -- `--install`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system).
66 +- `--install`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system), this option is deprecated and will be removed in a future version, please use `--install-prefix` instead.
67 +- `--install-prefix`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system).
68 - `--old-install-prefix`: Specify the custom local build's installation prefix that should be removed.
69 - `--uninstall`: Uninstall an existing installation of Netdata.
70 - `--reinstall-clean`: Performs an uninstall of Netdata and clean installation.