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
fa673468
Commit
fa673468
authored
Apr 25, 2019
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add INSTALL_K3S_BIN_DIR_READ_ONLY variable
parent
3543ba4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
install.sh
install.sh
+9
-0
No files found.
install.sh
View file @
fa673468
...
...
@@ -33,6 +33,10 @@ set -e
# Directory to install k3s binary, links, and uninstall script to, or use
# /usr/local/bin as the default
#
# - INSTALL_K3S_BIN_DIR_READ_ONLY
# If set to true will not write files to INSTALL_K3S_BIN_DIR, forces
# setting INSTALL_K3S_SKIP_DOWNLOAD=true
#
# - INSTALL_K3S_SYSTEMD_DIR
# Directory to install systemd service and environment files to, or use
# /etc/systemd/system as the default
...
...
@@ -164,6 +168,9 @@ setup_env() {
fi
PRE_INSTALL_HASHES
=
`
get_installed_hashes
`
if
[
"
${
INSTALL_K3S_BIN_DIR_READ_ONLY
}
"
=
"true"
]
;
then
INSTALL_K3S_SKIP_DOWNLOAD
=
true
fi
}
# --- check if skip download environment variable set ---
...
...
@@ -321,6 +328,7 @@ download_and_verify() {
# --- add additional utility links ---
create_symlinks
()
{
[
"
${
INSTALL_K3S_BIN_DIR_READ_ONLY
}
"
=
"true"
]
&&
return
if
[
!
-e
${
BIN_DIR
}
/kubectl
]
;
then
info
"Creating
${
BIN_DIR
}
/kubectl symlink to k3s"
$SUDO
ln
-s
k3s
${
BIN_DIR
}
/kubectl
...
...
@@ -334,6 +342,7 @@ create_symlinks() {
# --- create uninstall script ---
create_uninstall
()
{
[
"
${
INSTALL_K3S_BIN_DIR_READ_ONLY
}
"
=
"true"
]
&&
return
info
"Creating uninstall script
${
BIN_DIR
}
/
${
UNINSTALL_K3S_SH
}
"
$SUDO
tee
${
BIN_DIR
}
/
${
UNINSTALL_K3S_SH
}
>
/dev/null
<<
EOF
#!/bin/sh
...
...
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