Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
15d03c59
Commit
15d03c59
authored
Dec 04, 2020
by
Brad Davidson
Committed by
Brad Davidson
Dec 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix alternate bindir logic for #2551
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
a7bf00bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
install.sh
install.sh
+6
-2
No files found.
install.sh
View file @
15d03c59
...
@@ -224,9 +224,13 @@ setup_env() {
...
@@ -224,9 +224,13 @@ setup_env() {
if
[
-n
"
${
INSTALL_K3S_BIN_DIR
}
"
]
;
then
if
[
-n
"
${
INSTALL_K3S_BIN_DIR
}
"
]
;
then
BIN_DIR
=
${
INSTALL_K3S_BIN_DIR
}
BIN_DIR
=
${
INSTALL_K3S_BIN_DIR
}
else
else
# --- use /usr/local/bin if
we can write to it, otherwise try /opt
# --- use /usr/local/bin if
root can write to it, otherwise use /opt/bin if it exists
BIN_DIR
=
/usr/local/bin
BIN_DIR
=
/usr/local/bin
touch
${
BIN_DIR
}
/k3s-ro-test 2>/dev/null
&&
rm
-rf
${
BIN_DIR
}
/k3s-ro-test
||
BIN_DIR
=
/opt/bin
if
!
$SUDO
sh
-c
"touch
${
BIN_DIR
}
/k3s-ro-test && rm -rf
${
BIN_DIR
}
/k3s-ro-test"
;
then
if
[
-d
/opt/bin
]
;
then
BIN_DIR
=
/opt/bin
fi
fi
fi
fi
# --- use systemd directory if defined or create default ---
# --- use systemd directory if defined or create default ---
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment