Merge pull request #754 from joakimr-axis/joakimr-axis_comparison

install.sh: Use -eq instead of = for integer comparison
pull/771/head
Erik Wilson 2019-08-26 09:39:23 -07:00 committed by GitHub
commit b20f23ceb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,7 @@ setup_env() {
# --- use sudo if we are not already root --- # --- use sudo if we are not already root ---
SUDO=sudo SUDO=sudo
if [ $(id -u) = 0 ]; then if [ $(id -u) -eq 0 ]; then
SUDO= SUDO=
fi fi
@ -401,7 +401,7 @@ create_killall() {
$SUDO tee ${BIN_DIR}/${KILLALL_K3S_SH} >/dev/null << \EOF $SUDO tee ${BIN_DIR}/${KILLALL_K3S_SH} >/dev/null << \EOF
#!/bin/sh #!/bin/sh
set -x set -x
[ $(id -u) = 0 ] || exec sudo $0 $@ [ $(id -u) -eq 0 ] || exec sudo $0 $@
for bin in /var/lib/rancher/k3s/data/**/bin/; do for bin in /var/lib/rancher/k3s/data/**/bin/; do
[ -d $bin ] && export PATH=$bin:$PATH [ -d $bin ] && export PATH=$bin:$PATH
@ -457,7 +457,7 @@ create_uninstall() {
$SUDO tee ${BIN_DIR}/${UNINSTALL_K3S_SH} >/dev/null << EOF $SUDO tee ${BIN_DIR}/${UNINSTALL_K3S_SH} >/dev/null << EOF
#!/bin/sh #!/bin/sh
set -x set -x
[ \$(id -u) = 0 ] || exec sudo \$0 \$@ [ \$(id -u) -eq 0 ] || exec sudo \$0 \$@
${BIN_DIR}/${KILLALL_K3S_SH} ${BIN_DIR}/${KILLALL_K3S_SH}