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
397ae335
Commit
397ae335
authored
Mar 22, 2019
by
Brandon Wulf
Committed by
Darren Shepherd
Mar 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the selinux context during the install (#228)
* Set the selinux context
parent
9dd60779
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
install.sh
install.sh
+11
-1
No files found.
install.sh
View file @
397ae335
...
...
@@ -10,7 +10,7 @@ set -e
# Installing a server without an agent:
# curl ... | INSTALL_K3S_EXEC="--disable-agent" sh -
# Installing an agent to point at a server:
# curl ... | K3S_TOKEN=xxx K3S_URL=https://server-url:6443 sh -
# curl ... | K3S_TOKEN=xxx K3S_URL=https://server-url:6443 sh -
#
# Environment variables:
# - K3S_*
...
...
@@ -262,6 +262,16 @@ setup_binary() {
info
"Installing k3s to
${
BIN_DIR
}
/k3s"
$SUDO
chown
root:root
${
TMP_BIN
}
$SUDO
mv
-f
${
TMP_BIN
}
${
BIN_DIR
}
/k3s
if
command
-v
getenforce
>
/dev/null 2>&1
;
then
if
[
"Disabled"
!=
`
getenforce
`
]
;
then
info
"SeLinux is enabled, setting permissions"
if
!
$SUDO
semanage fcontext
-l
|
grep
"
${
BIN_DIR
}
/k3s"
>
/dev/null 2>&1
;
then
$SUDO
semanage fcontext
-a
-t
bin_t
"
${
BIN_DIR
}
/k3s"
fi
$SUDO
restorecon
-v
${
BIN_DIR
}
/k3s
>
/dev/null
fi
fi
}
# --- download and verify k3s ---
...
...
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