mirror of https://github.com/k3s-io/k3s
Merge pull request #754 from joakimr-axis/joakimr-axis_comparison
install.sh: Use -eq instead of = for integer comparisonpull/771/head
commit
b20f23ceb0
|
@ -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}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue