allow netdata-updater.sh to run under non-bash; fixes #2267
Costa Tsaousis (ktsaou) committed
Jun 1, 2017 at 14:13 UTC
fa7149c68b249b9ae93724016db02a912ac87c07
2 files changed
+6
installer/functions.sh
+4
@@ -1,5 +1,9 @@
1
# no shebang necessary - this is a library to be sourced
2
3
+# make sure we have a UID
4
+[ -z "${UID}" ] && UID="$(id -u)"
5
+
6
+
7
# -----------------------------------------------------------------------------
8
# checking the availability of commands
9
netdata-installer.sh
+2
@@ -1173,6 +1173,8 @@ export PATH="\${PATH}:${PATH}"
1173
export CFLAGS="${CFLAGS}"
1174
export NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS}"
1175
1176
+# make sure we have a UID
1177
+[ -z "\${UID}" ] && UID="\$(id -u)"
1178
INSTALL_UID="${UID}"
1179
if [ "\${INSTALL_UID}" != "\${UID}" ]
1180
then