mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #754 from joakimr-axis/joakimr-axis_comparison
install.sh: Use -eq instead of = for integer comparison
This commit is contained in:
commit
b20f23ceb0
@ -167,7 +167,7 @@ setup_env() {
|
||||
|
||||
# --- use sudo if we are not already root ---
|
||||
SUDO=sudo
|
||||
if [ $(id -u) = 0 ]; then
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
SUDO=
|
||||
fi
|
||||
|
||||
@ -401,7 +401,7 @@ create_killall() {
|
||||
$SUDO tee ${BIN_DIR}/${KILLALL_K3S_SH} >/dev/null << \EOF
|
||||
#!/bin/sh
|
||||
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
|
||||
[ -d $bin ] && export PATH=$bin:$PATH
|
||||
@ -457,7 +457,7 @@ create_uninstall() {
|
||||
$SUDO tee ${BIN_DIR}/${UNINSTALL_K3S_SH} >/dev/null << EOF
|
||||
#!/bin/sh
|
||||
set -x
|
||||
[ \$(id -u) = 0 ] || exec sudo \$0 \$@
|
||||
[ \$(id -u) -eq 0 ] || exec sudo \$0 \$@
|
||||
|
||||
${BIN_DIR}/${KILLALL_K3S_SH}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user